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'm looking for a simple solution to add another parameter with email to register a user or find a user. Right now find_resource is only using email but I would like to do something like this
where(email: my_email,my_param: my_other_param)
so it would be a where clause on email AND my_param for every calls (register, login, logout, etc.)
Or a better solution would be to override that line
to make sure it's uniqueness with provider AND my_other_param.
I was thinking about relying on another column instead of email like username (so I would concatenate email and my_other_param as a username but it seems it does that validation before using my username. Am I wrong?
I don't want to override all the controllers or copy a whole file from your gem because I want to be sure that every time I update your gem, I stay up to date.
Thanks!
The text was updated successfully, but these errors were encountered:
Well, you can return false in email_provider?, and do your own validation. This isn't a login with multiple fields, it's more a special case, and this gem is already overloaded with special cases.
I would like to add another where clause based on a custom field (that could have been set in the initializer for example). I would like to override find_resource in a easy way. I would like to make that change permanent (not only when logging but also registering, token, reset password, etc.)
Hi guys,
I'm looking for a simple solution to add another parameter with
email
to register a user or find a user. Right nowfind_resource
is only usingemail
but I would like to do something like thisso it would be a
where
clause onemail
ANDmy_param
for every calls (register, login, logout, etc.)Or a better solution would be to override that line
to make sure it's uniqueness with provider AND my_other_param.
I was thinking about relying on another column instead of
email
likeusername
(so I would concatenateemail
andmy_other_param
as ausername
but it seems it does that validation before using myusername
. Am I wrong?I don't want to override all the controllers or copy a whole file from your gem because I want to be sure that every time I update your gem, I stay up to date.
Thanks!
The text was updated successfully, but these errors were encountered: