I am working on a SPA project where i would like to have very short expiration (15min) and ability to refresh these. I will be utilizing VueJS so it would be beneficial to do the refreshing behind the scenes. Since it is a SPA i cannot use refresh_tokens. Whats my options in this case?
You can try with implicit flow, and then renewAuth using auth0’s web sdk. This will renew your token on an iframe and works without using a refresh token. The drawback is that you need to use a login page hosted on auth0 and since this will require a redirect it will not be so nice for a SPA.
I took basis in The Complete Guide to Vue.js User Authentication with Auth0 but unfortunately it also redirects to the lock10 which is not a super nice solution…
@maziar did you find a solution to this? I have SPA too, and I don’t want to redirect anywhere.
@maziar did you find a solution to this? I have SPA too, and I don’t want to redirect anywhere.