Config constructor

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

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

Implementation

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