I am writing an application and am using OAuth for authentication and for getting a user's email. I am successfully authenticating, but am unsure how to manage session. I want to protect my resources but I don't think I want to re-authenticate every time a user goes to a new page.
Current Flow
- User clicks 'log in with Google'
- User gets redirected to Google to approve of request
- Server gets a token on user's approval
- Server uses token to get email
What now?
I am using OAuth2 for the services that support it (Facebook, Google) and OAuth1a for those that don't.
I had trouble finding flow for returning users and maintaining authentication during a user's time on the site. Are there any good resources on best practice for maintaining session or returning users?