Config constructor

Config({
  1. required String tenantId,
  2. required String clientId,
  3. required String scope,
  4. required String redirectUri,
  5. required String responseType,
  6. BuildContext? context,
  7. String? clientSecret,
  8. String? resource,
  9. String contentType = 'application/x-www-form-urlencoded',
  10. String? userAgent,
  11. String nonce = 'nonce_value',
  12. int tokenRefreshAdvanceInSeconds = 300,
})

ResponseType to mobile usually is "code", and web usually is "id_token+token"

Implementation

Config(
    {required this.tenantId,
    required this.clientId,
    required this.scope,
    required this.redirectUri,
    required this.responseType,
    this.context,
    this.clientSecret,
    this.resource,
    this.contentType = 'application/x-www-form-urlencoded',
    this.userAgent,
    this.nonce = 'nonce_value',
    this.tokenRefreshAdvanceInSeconds = 300}) {
  authorizationUrl =
      'https://login.microsoftonline.com/$tenantId/oauth2/v2.0/authorize';
  tokenUrl = 'https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token';
}