We are making an app that doesn’t use emails.
Pow has a way to change the user_id_field
to accommodate non-emails.
How can we configure Phx Gen Auth to use nickname
or some other string instead email
as User ID?
We are making an app that doesn’t use emails.
Pow has a way to change the user_id_field
to accommodate non-emails.
How can we configure Phx Gen Auth to use nickname
or some other string instead email
as User ID?
There is no such configuration option, but you can tweak the generated code as you wish. For example, you can rename the email field to nickname, in all the generated files. Some things from the top of my head, that you’d have to look out for:
If you only want session management (no user and credential management), consider using the guardian library. But then you’d still need to manage your users/accounts somehow, or hook into other social identity providers with OAuth (very doable).
Main message: don’t be afraid to change the generated code to your needs, after studying it (it’s no rocket science, just very well thought out standard flow).
If Pow is in your toolbox allready, why not keep using it? It’s still well maintained and supported afaik (never used it though, just know what it’s used for).