Authgear constructor
Authgear({
- required String clientID,
- required String endpoint,
- String name = "default",
- bool isSsoEnabled = false,
- Future<
void> sendWechatAuthRequest()?, - TokenStorage? tokenStorage,
- UIImplementation? uiImplementation,
Implementation
Authgear({
required this.clientID,
required this.endpoint,
this.name = "default",
this.isSsoEnabled = false,
this.sendWechatAuthRequest,
TokenStorage? tokenStorage,
UIImplementation? uiImplementation,
}) : _tokenStorage = tokenStorage ?? PersistentTokenStorage(),
_uiImplementation = uiImplementation ?? DeviceBrowserUIImplementation(),
_storage = PersistentContainerStorage() {
final plainHttpClient = Client();
final authgearHttpClient = AuthgearHttpClient(this, plainHttpClient);
_apiClient = APIClient(
endpoint: endpoint,
plainHttpClient: plainHttpClient,
authgearHttpClient: authgearHttpClient,
);
experimental = AuthgearExperimental(this);
}