refreshSession(req, res)
Parameters
Returns
Promise<Session>
on successful refresh. To know more about the Session
object, click here
Throws
- GENERAL_ERROR
- UNAUTHORISED
- This is thrown if the current session was revoked or has expired, or if the provided refresh token is invalid.
- When this is thrown, all the relevant auth cookies are cleared by this function call, so you can redirect the user to a login page.
- TOKEN_THEFT_DETECTED
- This is thrown if token theft is detected.
- When this is thrown, all the relevant auth cookies are cleared by this function call, so you can redirect the user to a login page.