Questions tagged [login]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

How how can I restrict/fail a login using a User::EVENT_BEFORE_AUTHENTICATE hook?

When a user attempts to login, I check a 3rd-party to make sure they should have access. If they shouldn't, I need to stop them logging in. I have this working, but I could only get it working by ...
2
votes
1answer
126 views

CORS preflight check failing for AJAX login form on different domain

I've built an AJAX frontend login form, using plain Javascript. It works fine until I try and access it from a different domain. The problem is CORS and the preflight request. The preflight request ...
0
votes
0answers
17 views

User Login issue for users, its only allowing admin to login from front-end its buffering with username or password is wrong for other users

i used user login form from craft document https://docs.craftcms.com/v3/dev/examples/login-form.html
1
vote
1answer
46 views

{% requireLogin %} not returning to original page

According to the Craft docs {% requireLogin %} on a page should return the user to the same page after login. This doesn't work for me - the returned page is always the one set in 'postLoginRedirect'. ...
1
vote
1answer
74 views

Redirect user to language site of choice

On this multi-language site (NL, FR, EN) we're using the saml plugin to single sign on users into the craft site. That part is working fine. Every user has a preferred lanuage returned into a user ...
1
vote
1answer
49 views

Limit DevMode to admin users?

Is there an easy way to enable devMode only to users logged in with specific permissions?
0
votes
0answers
19 views

postLoginRedirect paths for multi-site scenario

When using settings like postLoginRedirect or loginPath in a multi-site scenario, is there a way to way to define different paths for each site? Or would the path defined be used for both sites, just ...
1
vote
1answer
68 views

getting active userid by GraphQL?

I build a SPA with Craft CMS and Vue. I use Vue Router and have three Props. Here is my current router-view: <router-view csrfName="{{craft.app.config.general.csrfTokenName}}" csrfToken="{{...
0
votes
1answer
61 views

How to override UserController.actionLogin or the login form template in Craft 3?

Hi I'm trying to build a custom authentication plugin for an organization, and I'm having a hard time figuring out how to override the craft\controllers\UserController.actionLogin method. I tried ...
0
votes
0answers
58 views

What's left to troubleshoot this quirky “Unable to verify your data submission” behavior?

I have a frontend login form that sends a request to Craft's own actions/users/login action. I've used this same process in another project and it works there, but not here, and I can't figure out ...
0
votes
0answers
38 views

Not able to access CP locally

I switched computers a few months ago, installed AMP server using same configurations I had. Now I cannot access CP on my Craft 3 projects locally. Front-ends load fine though. Every time I click ...
0
votes
0answers
29 views

CP login error for (only) one user in particular

One of our client logins has stopped working. When you try to login there's a spinner and then Failed to load resource: the server responded with a status of 504 () error on index.php:1 Sometimes ...
1
vote
2answers
146 views

Visitor-facing pages work; admin login doesn't--I can't login in to admin

The login page has no styling, including no Powered by image. This is what displays beneath the site's title: When I try to login I receive: Bad Request Unable to verify your data submission. The ...
0
votes
0answers
25 views

Craft 3 Multi-site with no “default” site AND where control panel login route remains intact and additional directories not necessary

Maybe one of you can help me out? I've tried setting up a multi-language site with no "default site" as per Craft 3 Multi-site with no "default" site. So far so good, except the control ...
1
vote
1answer
38 views

Craft login redirecting to /web instead of /templates?

I've moved my Craft directory to the below: Templates Public_Html Web etc.. etc.. My previous directory when I installed was: Public_html > Craft-setup > Web > Templates Now when I login ...
1
vote
1answer
56 views

PHP Login & Sessions without Craft Commerce?

I'm trying to implement this tutorial in my Craft CMS site, I've created all the files and they currently reside in public_html, but twig and the .htaccess of Craft CMS is interfering with it. Does ...
2
votes
1answer
82 views

Craft 3 Redirect after login based on User field

i'd like to alter the after login redirect URL based on a User custom field, i encountered this but looks like it's not applicable to Craft 3. I could re-write the whole UsersController class on a ...
1
vote
1answer
143 views

Invalid username or password

After installing Craft 3 successfully, I can't access the admin panel while using the correct credentials. I get an "invalid username or password" message.
1
vote
1answer
66 views

Show error when normal user try to login in CP

when I login to my Craft CMS website via a normal user that user doesn't have permission to login to the Control Panel, it displays some error like HTTP 403 – Forbidden – yii\web\...
1
vote
1answer
102 views

How do you get the user id on the front-end?

I'm using Craft Pro to make a website where users have a private area. Users register and when login happens they are redirected to a page in the private area with respective info about that user. ...
1
vote
1answer
137 views

Confusion over 'require login' behavior

Quote from the {% requireLogin %} docs: This tag will ensure that the user is logged in. If they aren’t, they will be redirected to the Login page, and returned to the original page after ...
2
votes
3answers
299 views

Login Modal - How to handle incorrect password / credentials?

I'm developing a site in Craft 2, using a modal to display the login form. The modal can be seen by clicking the Login button at top right. I'm essentially using the form as outlined in the Craft 2 ...
1
vote
1answer
120 views

Bypass CP login

I've got a very special case in a big offline installation . For strange technical and administrative reasons, I must have 5 different Craft instances each one in it's own server (on the local network)...
1
vote
1answer
107 views

Can't Get Past Control Panel Login. Keeps Redirecting Back to Login Page

I followed this guide to move my local hosting from WAMP, which has been giving me a bunch of 500 errors since switching to Craft 3, to Local By Flywheel. After getting everything configured, I can ...
2
votes
1answer
201 views

Locked out of my Account, how to get back in?

This really stressing me out! When trying to log back in to Craft CMS today after som time my password wouldn´t work. I have not changed it and when trying to reset the password I´m only getting: "...
1
vote
1answer
863 views

Save and login user in a Plugin?

How can I register and login a user in my Controller? I have tried something like this: $newUser = new User($userName, $userPassword, $userEmail); Craft::$app->elements->saveUser($newUser);
1
vote
1answer
202 views

Log in User (Craft 3)

How can I log in a user in Craft 3 and redirect to a url? This doesn't work: $username = $user->username; $userCode = $user->teamCode; Craft::$app->user->login($username, $userCode); ...
1
vote
1answer
126 views

plugins route post controller?

I am developing a custom authentication plugin for Craft 3. But I can't route to my Controller via POST request with my login form. Request via GET work
1
vote
2answers
376 views

How to disable plugin Disable and Uninstall?

I am developing a site with a customer logged in area. I don't want anyone to access the section if they are logged out and instead redirect them to the login form. I could just add {% requireLogin %...
2
votes
1answer
1k views

Craft 3 Element API Authentication/Login

First things first: This is quite similar to this, yet different. I'm trying to get authentication/login for Element-API for Craft 3 to work. Meaning I would like to restrict access to certain ...
0
votes
1answer
171 views

Case Sensitive username

Is craft's username field case sensitive when logging in? I'm importing 80 users into the database and when emailing the users I want to be sure how this works so we don't hit issues when they all ...
1
vote
1answer
169 views

Programmatically Login From Plugin

I'm writing an LDAP authentication plugin, which, if the authentication matches, will log the user into a 'general' username/password, in order to view a protected page. The 'general' username/...
1
vote
1answer
86 views

Possible to set Forgotten Password path in config?

Looking at the documentation here: https://docs.craftcms.com/v2/config-settings.html#users I have set loginPath, invalidUserTokenPath and setPasswordPath. However, it appears that there isn't a ...
1
vote
3answers
412 views

400 error logging into local Craft 3 project

I have just tried to log into an old local Craft 3 project that hasn't been worked on in a few months and I'm getting the following: HTTP 400 – Bad Request – yii\web\BadRequestHttpException Unable ...
2
votes
1answer
183 views

Invalid Verification Code Customization?

When a user attempts to reset their password, they're emailed a link -- if they click on this link late, or click on it twice, they're shown the "Oops! Invalid verification code. Please login or reset ...
1
vote
1answer
241 views

Craft 3: Non-Admin Users Can't Login

Here's an odd one: I have a site with many users, only a few of them admins. Any admin user can login either via the /admin control panel or through a frontend login, which follows the example from ...
1
vote
1answer
123 views

Locked out of the admin interface

I'm having an issue with the login-page and since this is my first Craft website, I'm a little unsure of where to begin to look. When attempting to log in to the admin interface, my username/...
1
vote
0answers
137 views

Refresh “hidden” template after login with ajax

I am trying to create a seamless user login interaction with a modal form using ajax. Let's say I have a navigation template _navigation.html <div> {% if currentUser %} {{ currentUser }}...
1
vote
1answer
133 views

Login grayed out, logins rejected

We have web site with CraftCMS Pro 2.6.2930. Due to development of new site, we set test web server (Centos/Apache/mariaDB) in our local network and migrated whole site there for testing (2.6.2993 ...
0
votes
0answers
159 views

saveUser form action posting elsewhere?

We have a page where a user may use one form to login to their Craft account on the front end - and one form where they can create and account. See the page here: https://www.cadex.com/shop/account/...
1
vote
1answer
79 views

After switching from PHP 5 to 7 for a local 2.x install, I can't login

I have Craft running locally, the latest 2.x branch. When I change the server to run PHP 7 instead of 5.x, the local Craft frontend still works, but I can't login to the backend. It says "Invalid ...
1
vote
2answers
1k views

Can't login after installing Craft CMS 3

I just installed Craft CMS 3 and I tried logging in as my admin user but it's not working. I enter the correct login information and nothing happens. I tried the reset password option but never got ...
1
vote
1answer
414 views

how to set loginPath in config file

I made a modal for login at homepage and put {%requireLogin%} tag in "User Profile" page. My general.php file looks like below: 'dev' => [ // Base site URL 'siteUrl' => null, ...
1
vote
4answers
380 views

Migrated site - now dashboard keeps logging out

I've migrated my client's Craft site to a new host. On the front end the site is fine and working as it should. The problem is with the Craft admin area. I can login, but once logged I can’t access ...
1
vote
1answer
707 views

Invalid username or password, errorCode:0 but I'm using correct credentials

When I try to log in to CP as admin with correct credentials I'm getting "Invalid username or password" error and the response contains errorCode: 0 (I'm guessing CBaseUserIdentity::ERROR_NONE) Weird ...
3
votes
2answers
324 views

No craft_users table in Database

Good Afternoon. Im trying to recover admin login information for a website I have recently taken on, however there is no craft_users table within the database. Any help to locate the user info would ...
1
vote
2answers
525 views

Adding reCAPTCHA to the admin login page

Is there any plugin or relatively straightforward and accepted way to add a recaptcha to the login for the admin page? My research so far has come up with nothing. I'm curious if others have looked ...
1
vote
1answer
486 views

/login page in Craft keeps redirecting to home page. What could be causing that?

I have a structured channel setup to house all the static pages on the site. All of the pages display fine on the page entry template. But the /login page does not. It displays fine in Live Preview. ...
1
vote
1answer
181 views

Users are always logged out on front end

Users are always logged out on the front end on my Craft website. Even when logged in as admin I can access the CMS but on the front end user session always returns the following. Craft\...
1
vote
2answers
46 views

What might cause logins to work locally yet not in deployed environment?

We're getting a 404 (or a Craft 'page not found' error) with this path on the remote server: http://foo.example.net/admin/actions/users/login Same database using remote mySQL. Local logins work fine....