Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Facebook Auth (for second login) #4

Closed
wants to merge 1 commit into from
Closed

Fixing Facebook Auth (for second login) #4

wants to merge 1 commit into from

Conversation

dongilbert
Copy link

OAuth2 doesn't respond with a secret, so must only use find_by_token when looking up an existing user.

@philsturgeon
Copy link
Owner

Was this causing an error? Secret would be coming back as null, which should match the database and therefore not cause any problems.

@dongilbert
Copy link
Author

Not an error, just unexpected behavior. When using NinjAuth with facebook authentication, everything get's saved into the database just fine. However, when I log out, and try to log back in with NinjAuth Facebook, it asks me to re-register. It seems like the Model_Authentication::find_by_token_and_secret() method is failing.

I see what your saying though, that since $response->secret doesn't exist and is null, that it that would match the information in the database, and work w/o error. Let me do some more debugging. Maybe $response->secret needs to be explicitly set to NULL?

@dongilbert dongilbert closed this Sep 21, 2011
@dongilbert dongilbert reopened this Sep 21, 2011
@dongilbert
Copy link
Author

Arg - I hate that Comment & Close is the first button......

@dongilbert dongilbert closed this Sep 21, 2011
@dongilbert
Copy link
Author

You are right - it works with the code as is. I still haven't quite figured out what the problem was, but it is functioning.

@philsturgeon
Copy link
Owner

It IS set to null. If you can show that there was an error and this change
needs to happen then I'll merge it.

On Wed, Sep 21, 2011 at 9:33 PM, Don Gilbert <
reply@reply.github.com>wrote:

Not an error, just unexpected behavior. When using NinjAuth with facebook
authentication, everything get's saved into the database just fine. However,
when I log out, and try to log back in with NinjAuth Facebook, it asks me to
re-register. It seems like the
Model_Authentication::find_by_token_and_secret() method is failing.

I see what your saying though, that since $response->secret doesn't exist
and is null, that it that would match the information in the database, and
work w/o error. Let me do some more debugging. Maybe $response->secret needs
to be explicitly set to NULL?

Reply to this email directly or view it on GitHub:
#4 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants