refreshCurrentSession method
Deprecated Tries to refresh the currently active session. If no active session exists, throws an error.
Implementation
Future<AuthUserSession> refreshCurrentSession() async {
var currentSession = _localSessionRepository.activeSession;
var sessionUnavailable =
currentSession == null || currentSession.userId.isEmpty;
if (sessionUnavailable) {
logger.error(this, 'No active session to refresh.');
throw AuthException(AuthenticationErrorCodes.noActiveSessionToRefresh);
}
return await refreshSession(currentSession.userId);
}