Authgear constructor

Authgear({
  1. required String clientID,
  2. required String endpoint,
  3. String name = "default",
  4. bool isSsoEnabled = false,
  5. bool preAuthenticatedURLEnabled = false,
  6. Future<void> sendWechatAuthRequest(
    1. String
    )?,
  7. TokenStorage? tokenStorage,
  8. UIImplementation? uiImplementation,
})

Implementation

Authgear({
  required this.clientID,
  required this.endpoint,
  this.name = "default",
  this.isSsoEnabled = false,
  this.preAuthenticatedURLEnabled = false,
  this.sendWechatAuthRequest,
  TokenStorage? tokenStorage,
  UIImplementation? uiImplementation,
})  : _tokenStorage = tokenStorage ?? PersistentTokenStorage(),
      _uiImplementation = uiImplementation ?? DeviceBrowserUIImplementation(),
      _storage = PersistentContainerStorage(),
      _sharedStorage = PersistentInterAppSharedStorage() {
  _dpopProvider = DefaultDPoPProvider(
    namespace: name,
    sharedStorage: _sharedStorage,
  );
  final plainHttpClient = Client();
  final authgearHttpClient = AuthgearHttpClient(this, plainHttpClient);
  _apiClient = APIClient(
    endpoint: endpoint,
    plainHttpClient: plainHttpClient,
    authgearHttpClient: authgearHttpClient,
    dpopProvider: _dpopProvider,
  );
  experimental = AuthgearExperimental(this);
}