var auth = new auth0.WebAuth({
clientID: CLIENT_ID,
domain: CLIENT_DOMAIN,
})
export function login() {
auth.authorize({
responseType: 'token id_token',
redirectUri: REDIRECT,
audience: AUDIENCE,
scope: SCOPE,
})
}
Everything works fine, but when token expires in 2 hours, I have to login again. I want to refresh token silently. How can i do it? I couldn’t find any “refresh_token”
You should not use refresh tokens in a client side app (SPA). Take a look at silent authentication, if you are using auth0.js then you will use the checkSession method: