0

I have a quick question about using sessions across different windows. I'm currently trying to create a login screen for a web app that I'm creating and I was wondering if this flow will work by enabling sessions:

  1. Window A: User inputs basic account information and is stored inside sessions
  2. A new popup Window B is open and user is authenticated via Google oauth. I store the token session[:credentials] = generated_credentials. User closes Window B.
  3. Window A has access to session[:credentials]

I guess my question here is if step 3 is valid because I'm trying to essentially listen for a new cookie

Thank you for your help!

Tim
  • 2,221
  • 6
  • 22
  • 43

1 Answers1

0

Yes! This will work. I guess sinatra has some listener that always updates the session even if it was updated from a child window.

Tim
  • 2,221
  • 6
  • 22
  • 43