6
votes
How to allow guest to make entry without login
The Guest Entries plugin is made for this scenario!
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
Accepted
Intercept all requests before a Controller Action is executed
You're correct about both beforeAction() and onBeginRequest().
However, you could put an init() method in your main plugin class file and this will execute on every request as long as the plugin is ...
4
votes
Accepted
What is the correct way to use UserIdentity?
The basic user identity relies on login and password, so you will have to create your own class to represent an identity based on something else, like a token for example:
<?php
namespace Craft;
...
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 ...
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
Restricted front-end access
Sounds like a custom plugin is in order.
Your plugin could add a custom {% validateUser %} Twig tag. That tag would check to see if their logged in OR check craft.request.getIpAddress() and validate ...
3
votes
Restricted front-end access
Is the physical web server inside your network as well? As mcclaskiem mentioned, check to see if the IP address is within the subnet of your network and then allow access that way.
You may want to ...
3
votes
Accepted
Mobile app authentication
You're basically looking for authentication/authorization for the Element API plugin, which it currently doesn't support.
Should this require us to write our own plugin with a custom authentication ...
3
votes
Can we log both access & content changes?
Craft does some basic logging in the form of when an entry was updated/created and the last time a user logged in and from what IP address, etc. If you want anything more detailed than that, you'd ...
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
$allowAnonymous = true - not working
It sounds like you just want a cron job to trigger an action on your plugin.
You don't need to register any Control Panel routes for that, so you can remove your registerCpRoutes method.
If your ...
2
votes
What is the correct way to use UserIdentity?
What about setting up a relation between your CustomUserAuthModel and the UserModel, check if everything is alright through your plugin with IndieAuth, and then login, through UserSessionService->...
2
votes
Accepted
How can I restrict access to the Control Panel to a single port?
First set your web server up so the full website gets loaded from both the external ports (e.g. 80 and 443) as well as your internal port (let's say 9001).
Then open your index.php file, and add this ...
2
votes
Accepted
Front end authentication on an entry and its related entries
From experience, in terms of ui/ux AND ease in front end stages, If you can do things the other way round, do that.
So attached entries to users basically. When you have a new user, you add entries ...
2
votes
Accepted
Craft admin login infinite redirect in cluster
TL/DR
It sounds like you need to enable sticky sessions at your load-balancer/router level, so that the users will be sent back to the same server in the cluster that their session originated on.
...
2
votes
Just starting to evaluate - some basic questions
For 2, which is indeed subjective but nevertheless: Coming from WordPress, I always tell my customers that Craft is way better for us because I don't have to strip down a CMS before starting a project....
2
votes
Just starting to evaluate - some basic questions
For 1), check out Dukt's oAuth plugin for Craft. Not aware of any Active Directory plugins that have been written yet and not seeing any on here, either.
The second question is pretty subjective, so ...
2
votes
Accepted
Custom Authentication
Seems totally doable with a plugin.
The protected page where they enter their email address would post to a controller action in your plugin.
Your controller checks the domain of the submitted ...
2
votes
Protect entry so that only a "relatedTo" user can see it
You could loop through the users and compare them.
{% set authorized = false %}
{% for user in entry.authorizedUsers %}
{% if user == currentUser %}
{% set authorized = true %}
{% ...
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
Accepted
Does Craft Commerce support One Time Password and Social Login features?
Craft Pro gives you the ability to add multiple user accounts to your site. Craft Commerce is a plugin that extends Craft so user accounts and everything that goes with them are available to use.
...
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
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....
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
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
authentication × 42login × 7
plugin-development × 6
plugin-elementapi × 5
plugins × 4
users × 3
security × 3
plugin-social-login × 3
craft3 × 2
templating × 2
plugin-craftcommerce × 2
frontend × 2
registration × 2
plugin-duktoauth × 2
control-panel × 1
database × 1
entry × 1
php × 1
admin × 1
plugin-freeform × 1
events × 1
modules × 1
controller × 1
redirect × 1
craft-pro × 1