Where to store the refresh token on the Client?

You can store tokens securely in HttpOnly cookies.

https://medium.com/@sadnub/simple-and-secure-api-authentication-for-spas-e46bcea592ad

If you worry about long-living Refresh Token. You can skip storing it and not use it at all. Just keep Access Token in memory and do silent sign-in when Access Token expires.

Don’t use Implicit flow because it’s obsolete.

The most secure way of authentication for SPA is Authorization Code with PKCE.

In general, it’s better to use existing libraries based on oidc-client than building something on your own.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)