Login with Username instead of Email (Extend authentication parameters) #1196
Replies: 2 comments 3 replies
-
Hey @TomDoFuture — yes, you can build a custom auth strategy to accomplish this if you'd like. As of now, Payload only supports email-based local authentication but you can build your own using Passport strategies! |
Beta Was this translation helpful? Give feedback.
-
The docs on strategy lacks sample code. Specifically I would like the auth strategyto only apply to a custom collection, they do not need access to the Admin UI. The authentication status can be used for authorization in CRUD on another collection (together with the existing User collection). I've found two auth plugin but they are a bit too complicated for my use case. Any pointer to how to implementation a simple auth plugin? I can contribute it back to the community. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently one needs Email and Password to login as a user.
Would it be possible if I can create a text field called Username, and then login with the username instead of the email? So you can login with both.
Beta Was this translation helpful? Give feedback.
All reactions