Discuss: Why not add fields as param to build_from_identity_url#24
Discuss: Why not add fields as param to build_from_identity_url#24joshco wants to merge 1 commit into
Conversation
|
This seems totally reasonable to me. Would you mind writing a test or two to verify that this workflow works, and possibly updating the docs in your PR? |
|
Great. I will do that. Right now I'm finishing up an update to my app including this feature. I'll circle back in about a month with this (and any other issues that arise). |
|
Having a little trouble. How do I make it so the login form can also work with database_authenticatable? My login form is here: (ActionID is the openID provider) |
|
@joshco: the key is the You can see the code for ours here: https://github.com/nbudin/devise_openid_authenticatable/blob/master/lib/devise_openid_authenticatable/strategy.rb#L6 I'm not sure why it would be returning true in your case, but my guess is that it must be. |
I've started using this openid module in conjunction with existing database_authenticatable users in my app. I looked at the wiki doc on strategy
But this seems unnecessarily complex when dealing with the cases
Because the gem's workflow first creates a new user (when no identity url matches) but does not pass along the fields.
My patch includes the fields into the build class method on the resource (User). This allows one to handle these cases IMHO more simply with a method like: