configure method

Future<void> configure({
  1. String? resource,
  2. List<String>? scopes,
})

Implementation

Future<void> configure({
  /// Default resource indicator (RFC 8707) of the methods that take `resource`.
  ///
  /// It is used only when the call does not give its own `resource`, which replaces it.
  String? resource,

  /// Default scopes of the methods that create a new session.
  ///
  /// They are used only when the call does not give its own `scopes`, which replace them.
  /// The scopes required by the SDK are always requested.
  List<String>? scopes,
}) async {
  _defaultResource = resource;
  _defaultScopes = scopes;
  _refreshToken = await _tokenStorage.getRefreshToken(name);
  final sessionState = _refreshToken == null
      ? SessionState.noSession
      : SessionState.authenticated;
  _setSessionState(sessionState, SessionStateChangeReason.foundToken);
}