DescopeSession.fromJwt constructor
DescopeSession.fromJwt(
- String sessionJwt,
- String refreshJwt,
- DescopeUser user
Creates a new DescopeSession object from two JWT strings.
This constructor can be used to manually recreate a user's DescopeSession after
the application is relaunched if not using a DescopeSessionManager
for this.
Implementation
factory DescopeSession.fromJwt(String sessionJwt, String refreshJwt, DescopeUser user) {
final sessionToken = Token.decode(sessionJwt);
return DescopeSession._internal(sessionToken, refreshJwt.isNotEmpty ? Token.decode(refreshJwt) : sessionToken, user);
}