Closed ymansurozer closed 6 months ago
You will have to keep it SSR. Reason: It uses client secret to fetch creds, which would then be exposed to client side. Not a good practice.
https://github.com/bitinflow/nuxt-oauth Use this to go full SPA.
Feel free to close this issue if this resolves your concern.
Oh I see, thank you very much for clarifying this and also the recommendation. Much appreciated @amandesai01!
I've already seen https://github.com/Atinux/nuxt-auth-utils/issues/9 but wanted to confirm because the requirements highlight:
Does this mean we can use this module in a Nuxt project where the landing page runs with SSR but the logged in pages are an SPA? Or does it mean the whole auth flow must happen within an SSR context?
I've tried to migrate to this module in my SaaS starter template but it seems it cannot find the user session if I redirect to an SPA page after log in, although if I refresh the page, it returns the session fine.