Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Restoring user from session or oauth token
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
RedBugz  
View profile  
 More options Jul 23 2012, 12:13 pm
From: RedBugz <redb...@gmail.com>
Date: Mon, 23 Jul 2012 09:13:43 -0700 (PDT)
Local: Mon, Jul 23 2012 12:13 pm
Subject: Restoring user from session or oauth token

We have an oauth-based authentication strategy, but I would like to be able
to restore req.user based on an access token I have stored off that may
outlast the session.

When the stored access token is still valid, but for whatever reason the
browser session is gone and req.user no longer exists, what would be the
best way to restore req.user without going through the oauth sign-in
screen. I can use the stored access token to fetch the user profile, but I
don't know the best way to integrate that into req.user.

Would it be to override authenticate() in our oauth-based strategy and do a
token validation prior to calling oauth.authenticate()? Is there some
middleware I can add to validate the access token and restore the user in a
more integrated way? I can think of a few ways, but I'm not sure which
would be best.

thanks,
Logan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »