You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to implement a custom devise strategy where my User's provider is 'username', with a custom username field and recovery_email field along with it, validated in my User model, to ensure I can still log in for this user.
I had an implementation with this behaviour and validations all setup in my User model, however, in multiple places devise_token_auth overrides my User model to force a provider = 'email' even when I explicitly do not want it to.
Hey @KelseyDH , as @MaicolBen mentioned I think the pending PR for multi-auth methods per resource may help with this. Feel free to get in touch with the people working on it if you want to help move it forward! I've handed off the baton to those who are going after the bounty.
Thank you @zachfeldman , I've reached out. When I can get this flow working for username I can write a guide on how to do it and add it to this project's documentation.
I would like to implement a custom devise strategy where my User's
provider
is'username'
, with a customusername
field andrecovery_email
field along with it, validated in my User model, to ensure I can still log in for this user.I had an implementation with this behaviour and validations all setup in my User model, however, in multiple places
devise_token_auth
overrides my User model to force aprovider = 'email'
even when I explicitly do not want it to.I've seen other issues describing this matter, but nothing concrete about how to go about doing it.
Most ideal would be for the solution for username/email logins to echo closely with what's recommended in the devise guide How to: Allow users to sign in using their username or email address.
The text was updated successfully, but these errors were encountered: