5
votes
How to use the Element API plugin only when logged in?
If you want to restrict the whole API, you can add some code to the top of your /config/elementapi.php file (right below namespace Craft;) that checks for a logged in user, and ends the request with ...
4
votes
Redirecting to another page after a successful user log in
Have you checked this resource mzg?
Note:
You can customize where users should get redirected to after login via the postLoginRedirect config setting.
Then for any pages or templates you want to ...
3
votes
Accepted
Craft CMS Backing React FE using the element API
I created a react native app with Craft CMS (still version 2.6) as backend using the Element API. But you're right, user authentication is not supported by the Element API. However, I created my own ...
3
votes
How to use LDAP for authentication in Craft CP (back end)
There's a feature request here that would allow custom login forms for the Craft Control Panel login page you might want to add a comment to.
In the meantime, there is a userSession....
3
votes
Connecting to REST API using Basic Auth
I have built something similar so hopefully this will help get you rolling.
You are going to need to (or at least I would) create a plugin that you can call in your twig template. Pay special ...
2
votes
Accepted
Implementing two factor authentication / TOTP for CP logins
I know this is a little late, but i've just build a plugin for TOTP. It is in beta, so beware before using it in a production environment.
https://github.com/born05/craft-twofactorauthentication
2
votes
$allowAnonymous = true - not working
If the cron jobs are triggered at the server where your Craft installation is hosted, it might be better to implement a consolecommand instead to execute the logic you want. They are well suited for ...
2
votes
API Authentication for Craft CMS
You are going to have a hard time if you want to use Yii2 with Craft 2 since they are totally incompatible. Craft 2 uses yii and Craft 3 uses Yii2. You can't mix them. Furthermore you'll need multiple ...
2
votes
Accepted
Connecting to REST API using Basic Auth
Thank you for pointing me in the right direction! That was super helpful.
Here's what I ended with so far. Things may change depending on what I need down the road. It uses Basic Auth like I ...
2
votes
Accepted
How to Sign In/Up using social accounts ( Google, Facebook, Apple)?
At the risk of this question being closed for being too vague, maybe you need a starting point?
If you want to try your hand at writing a plugin, the first thing I would do is read up on the OAUTH ...
2
votes
Accepted
How to override UserController.actionLogin or the login form template in Craft 3?
Alright so I was actually misunderstanding how modules work with craft and yii. The init function in your module actually fires before crafts core controllers do, so you could use that to do whatever ...
1
vote
Accepted
Logging in to Craft via Vue/Javascript apps
And just like that I stumble over this wonderful blog post https://digitalevangelist.net/blog/vuejs-craft-cms-single-page-app-logging-in-to-craft
1
vote
Accepted
Craft CMS module composer dependancy
EDIT:
Had to do a sudo pecl install oauth in order to get access to the right OAuth. Had to add the extension to my php.ini and restart my server.
public function apiCall($consumer_key, $...
1
vote
Craft CMS module composer dependancy
The easiest way around this is to include the required library in your main-project composer.json and let it handle it rather than your modules composer.json.
The alternative is to require your ...
1
vote
Accepted
Craft 3 Element API Authentication/Login
First of all passing the password and username as query strings is one of the most insecure things you can do. It would highly suggest you to not do that unless you want to expose your accounts to ...
1
vote
Can Auth0 be used for Craft Commerce user accounts?
Craft Commerce and Craft does not support that service out of the box. A Craft plugin would need to created using their PHP Package: https://github.com/auth0/auth0-PHP
1
vote
Using ADLDAP plugin in Craft 2.6 - can't bind to LDAP
In more testing, I was able to eliminate the "Can't bind to LDAP server!" error message from Craft by removing both: Account Suffix and Admin Account Suffix settings from the ADLDAP parameter control ...
1
vote
Authorization fail
You didn't mention in the post, but you tagged the question with Dukt oAuth.
If you're trying to connect with that, Channel Advisor isn't a 1st or 3rd party Dukt oAuth provider. You can see a list ...
1
vote
Authentication by a custom field
A possible workaround would be to use the phone numbers as the username.
Then you could write a Craft plugin that listened to the onBeforeLogin event and validated the entered phonenumber against ...
1
vote
Authentication by a custom field
The short answer is no. Craft does not natively support this, and there's no way to implement it via a hook (or event).
A quick browse through the code shows that the UserIdentity::authenticate ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
authentication × 39login × 8
plugin-elementapi × 5
plugin-development × 4
plugins × 4
users × 3
security × 3
plugin-social-login × 3
craft3 × 2
templating × 2
plugin-craftcommerce × 2
redirect × 2
frontend × 2
registration × 2
control-panel × 1
database × 1
entry × 1
php × 1
admin × 1
plugin-freeform × 1
events × 1
modules × 1
controller × 1
craft-pro × 1
user-profile × 1