updateUser method

void updateUser(
  1. DescopeUser descopeUser
)

Updates the session user's details with those from another DescopeUser value.

final userResponse = await Descope.auth.me(session.refreshJwt);
session.updateUser(userResponse);

Important: It's recommended to use a DescopeSessionManager to manage sessions, in which case you should call updateUser on the manager itself instead to ensure that the updated user details are saved.

Implementation

void updateUser(DescopeUser descopeUser) {
  _user = descopeUser;
}