netlify-labs / oauth-example

Example of how to use Netlify OAuth Applications
https://oauth-example.netlify.com/
38 stars 18 forks source link

Always logged-out when I reload the page #2

Closed dwicao closed 4 years ago

dwicao commented 4 years ago

Hi, first of all, thank you so much for this helpful example.

I had an issue, here's how to replicate:

  1. Log in using "Netlify" button
  2. Successfully login, I can see my sites.
  3. When I hit the reload button on the browser, it asks me to log in again

How to prevent it? I'm sorry I just don't familiar with OAuth's spec, but it is intended? Is it to mitigate the CSRF attack?

dwicao commented 4 years ago

I know this is may not be the best approach, But I ended up encrypting the token and save it into local storage.