appwrite icon indicating copy to clipboard operation
appwrite copied to clipboard

Option to avoid the creation of a new user when email is unknown using the magic url based login

Open teamsolutions-dev opened this issue 5 years ago • 5 comments

🚀 Feature

Provide an option to avoid the creation of a new user when using a magic url based login with an e-mail that doesn't belong to any existing user

Have you spent some time to check if this issue has been raised before?

Yes, this feature hasn't been requested yet.

Have you read the Code of Conduct?

Yes

Pitch

This feature would allow the creation of users using the server side SDK defining only emails and not passwords. Then only users with known emails can login using the magic based url based login and users don't have to deal with passwords.

teamsolutions-dev avatar Sep 08 '21 12:09 teamsolutions-dev

Can you share more information about the use-case that caused you to believe this feature is required. I would also love to get more feedback from the community about making the password optional in the createAccount endpoint and whether more devs think this would still be intuitive to the API signature.

eldadfux avatar Sep 10 '21 19:09 eldadfux

The mobile app I'm working on is the mobile companion of an ERP system in which users, their emails and their permissions are defined. One of the permission is the access to the mobile app. The ERP system is based on a database system which is partially synchronized with Appwrite for the data that need to be accessed by the mobile app. The users are also synchronized so Appwrite knows which users are allowed. It is not permitted to create an account from the mobile app. So, the fact that an email exists in the Appwrite user database is for me the unique condition to give access to the application. So the magic url login is perfect for this use case IF an unknown email doesn't lead to an account creation.

teamsolutions-dev avatar Sep 13 '21 07:09 teamsolutions-dev

@teamsolutions-dev, in the Auth > Security settings, you can configure a Users limit:

image

If you set this to a low number, Appwrite will return an error if the email is not found:

https://github.com/appwrite/appwrite/blob/8a4302ffe6173e6b1256da5e7c86042d73983cdb/app/controllers/api/account.php#L912-L924

Would that suffice for you?

stnguyen90 avatar Oct 05 '23 00:10 stnguyen90

This issue has been labeled as a 'question', indicating that it requires additional information from the requestor. It has been inactive for 7 days. If no further activity occurs, this issue will be closed in 14 days.

github-actions[bot] avatar May 11 '24 00:05 github-actions[bot]

This issue has been closed due to inactivity. If you still require assistance, please provide the requested information.

github-actions[bot] avatar May 26 '24 00:05 github-actions[bot]