javascript - JWT - High quality ways to handle the user experience of a returning logged in user -


i have client that, once authenticated, stores jwt in localstorage. if user closes browser, , once again navigates site, client first checks jwt in localstorage, , if present, redirects via:

window.location.href = `/?jwt=${token}` 

this works fine except i'm not fan of user experience. user visits page, shown login page, , abruptly redirects new page.

i have played around hiding /auth/login's ui if jwt token found, it's still not great.

what better ways handle case user has left site, comes , should logged in?

is there way user return site after having closed browser, , shown logged in using jwt's?

this post great job of answering question:

https://dev.to/rtfeldman/defense-against-the-dark-arts-csrf-attacks


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -