-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: redirect inactive account to auth action page #869
fix: redirect inactive account to auth action page #869
Conversation
@sammyskills I cannot reproduce the situation with If an inactive account tries to log in, the system redirects the user to
and I get a email with token. |
Hi @kenjis, Yes, you will get the error message and it will be redirected to the Try this:
Live scenario:
|
@sammyskills "Delete the email_activate identity", this does not seem to happen. The live scenario could happen. But we already set the user active: shield/src/Controllers/RegisterController.php Lines 132 to 133 in 09a7cf3
|
Ok, fine. Let's look at it this way.
If you get what I mean, how does a user with a deactivated account "reactivate" their account? |
@sammyskills Okay, I got "You must activate your account before logging in."! |
Perfect! Now, how does this user activate/reactivate their account? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sammyskills thank you!
Description
The
isActivated()
check works for when a register action has been set in the auth config. Currently, if an inactive account tries to log in, the system redirects the user to the login page with the error message:You must activate your account before logging in.
This begs the question: "How do I activate my account?"
This PR fixes this issue by redirecting the user to the auth action page, where a new token is generated and sent to the user's email.
Checklist: