-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Add ability to login with link send to email (passwordless login) #9944
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9944 +/- ##
===========================================
- Coverage 60.06% 35.90% -24.16%
===========================================
Files 183 1342 +1159
Lines 5702 14815 +9113
Branches 1077 1478 +401
===========================================
+ Hits 3425 5320 +1895
- Misses 1817 8575 +6758
- Partials 460 920 +460
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Without even checking the user's password? |
Yes, if user has access to his mailbox he can login, otherwise - no access. On our side we don't store password in this case at all |
Well, this is a major security breach:
|
I'm not inventor of the login method, more information you can find at different places like https://fusionauth.io/docs/v1/tech/guides/passwordless/ or in Auth0 documentation |
Anyway, I'm just a regular Strapi user, their team may have a different opinion. |
|
Even more: By far the most dangerous security flow introduced by this PR would be the imposibility to use CSRF Protection. When user clicks a link inside it's own email account the access is automatically cross origin. CSRF Protection does not neccesarily block cross-origin access, but it ensures that allows access only to requests having a valid CSRF token sent in regular HTTP headers. Well, since there is impossible to get and set a CSRF token inside an email account the only way arround this would be to instruct the user to copy the login link and to paste it in the same window from where the login request was initiated. More abut login CSRF. |
https://firebase.google.com/docs/auth/web/email-link-auth As summary I would say that the PR is the first step to create more secure application with strapi, base on the suggested changes we have ability to move to two-factor authentication and integration with services like Google Authenticator. |
No, I dissagree, Rate limit protection should not be introduced to the system on global level, Rate Limit comes with a high cost and the use should not be abused, it should only be used on routes with sensitive data (e.g. In fact, I believe that Strapi should consider a scenario where access is managed entirely by another downstream application. This means that the Rate Limit should be optional, because if it is applied in a cascade, the delay time will be multiplied unnecessarily. |
https://forum.strapi.io/t/rate-limiting-for-routes/953 Based on the answer you can see that rate limit protection introduced on plugin level (not global, you are right). |
…send to email (add missed routes)
|
I want to disable in admin panel, I avoid to cusomize Strapi in any way for now because |
I think you can create an issue or PR with adding rate limit to the admin panel. It is part of users-permissions plugin. |
I don't think Strapi and I share the same vision about modular design, fallback system, and so on. I've tried before, that's enough. Strapi for a reason I don't understand prefers that some things can't be done from the Administration Panel, at least that's how I see it. |
|
@kucherenko kucherenko |
Anything saved in files (minus model structures, IE the content-type-builder) cannot be configured in the admin panel due to the need for node to restart which should not happen in production. Most configuration options are done via files to follow standard source control and automation (see ansible) type deployments. Anything that is configurable in the admin panel is saved to the database. |
|
On that note, I'm going to lock this PR from further comments until the team can review it, it's unlikely we would merge something like this due the plans we have in mind but for further discussion I suggest you move this over to our forum: https://forum.strapi.io |
|
This pull request has been mentioned on Strapi Community Forum. There might be relevant details there: https://forum.strapi.io/t/passwordless-login-for-strapi/4893/1 |
|
Hi 👋 |
What does it do?
New feature added to strapi-plugin-users-permissions
Why is it needed?
One of the secure and easiest way to login is a link send to email