Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8335801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:46:56+00:00 2026-06-09T03:46:56+00:00

Wrapping my old-fashioned head around OAuth…. Aside from the request/response mechanics and the Authorize

  • 0

Wrapping my old-fashioned head around OAuth….

Aside from the request/response mechanics and the Authorize / Authenticate round trips (which I think I underdstand) I am struggling with mapping my MyUser object (whatever that may contain) to an OAuth token, if (actually when, not if) the user kills any cookies (encrypted or otherwise) I may have dropped on the browser.

I get MyUser info at the original Login (call it ‘registration’ for my site) but now MyUser comes back, all cookies are gone so he is just ‘user’. Fair enough, user has to do an OAuth login again, but now I have no way of associating the new Token / Secret with MyUser data.

What am I missing?

— edit Aug 2/2012 —–

Let me restate this (I am pretty sure I am being thick about this but guess thats what here is for):

As pointed out in Replies, each OAuth provider has their own mechanism. We can navigate those and get back an access Token for the user.

Lets say Hero registers on my site using Facebook. FB returns his FB UserID and Name along with the Access Token. We are clever enough to request and get his FB Email, and we ask him some other registration q’s before letting him in. Then we save this in our datastore (linked to our own User record):

OurUserId : 1234
oAuthProviderName : Facebook
oAUthProviderUserId: xxxxx
oAuthProviderUserEmail: hero@mlb.com
oAuthProviderUserName: iBeHero
oAuthToken: entracingly-unique-string-of-goop
oAuthSecret: moredata
.... etc.

and set a cookie to identify him as our user# 1234.

Now Hero goes away, kills his cookies for some reason, and then comes back to us.

Now he decides to Log In with Twitter. I have no cookie so I don’t know who he is, and we go through the process again.

To me he looks like a new user so once Twitter sends me a Token I start asking him Registration questions, clearly not right.

Turns out Twitter doesn’t return an Email address so I can’t match that, and even if they did (I think almost everyone else does) Hero likley has more than one Email.

It seems to me that the only tie I have between the two (or however many) logins is whatever cookies I set that have not been deleted.

Are we saying that the entire OAuth2.0 mechanism hangs on this? I can’t belive that is right, but don’t see another way, so I must be missing something , yes?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:46:58+00:00Added an answer on June 9, 2026 at 3:46 am

    If you’re using OAuth as a login mechanism as well, then make sure whichever provider you’re talking to has some way of returning back a stable ID for a user. That ID is the key you’d use for looking up the user in your DB.

    Different providers have different ways of doing this. For Google, details on how to do authentication with OAuth 2.0 are here. For Twitter, they use OAuth 1.0 and return the user ID when exchanging the code for an access token. Facebook has its own way of doing it as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Still wrapping my head around Delegates and I'm curious: Is it possible to overload
I'm having trouble wrapping my head around how to write this query. A hypothetical
Am wrapping my head around JavaScript closures and am at a point where things
I am having trouble wrapping my head around how to make a Dojo Deferred
Been wrapping my head around this problem for a while and looking for solutions
Still wrapping my head around SQL and PHP, but hope someone can help with
I'm having a hard time wrapping my head around how to merge jQuery /
I'm having little success wrapping my head around the basic plumbing of the types
I am still wrapping my head around this whole MVVM pattern but i thought
I have the age-old problem of a div wrapping a two-column layout. My sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.