DEV Community

Discussion on: PKCE authenticaton for Nuxt SPA with Laravel as backend

Collapse
 
thorbn profile image
Thor

Great tutorial. I'm new to Passport and PKCE.

What is the "best practice" way on checking if a user is logged in frontend? so instead there will be a logout button and not a login button.

Collapse
 
stefant123 profile image
StefanT123

You should check if the token exists in the cookies or in the localStorage (wherever you have stored it)

Collapse
 
thorbn profile image
Thor

I have not stored it yet. The way you store it here is that the best way? dev.to/stefant123/secure-authentic...

Thread Thread
 
stefant123 profile image
StefanT123

I think yes, or I still haven't found any better way to do it.