updateTokens method
Updates the active session's underlying JWTs.
This function accepts a RefreshResponse value as a parameter which is returned
by calls to Descope.auth.refreshSession. The manager will persist the updated session.
Important: In most circumstances it's best to use refreshSessionIfNeeded and let
it update the session unless you need to invoke Descope.auth.refreshSession
manually.
Note: If the DescopeSessionManager object was created with a custom storage
object then the exact behavior depends on the specific implementation of the
DescopeSessionStorage interface.
Implementation
void updateTokens(RefreshResponse refreshResponse) {
final session = _session;
if (session != null) {
session.updateTokens(refreshResponse);
storage.saveSession(session);
_notifyTokens(session);
}
}