initAuth0Web function

Future<Auth0> initAuth0Web({
  1. required String auth0Domain,
  2. required String auth0ClientId,
  3. String? redirectUri,
})

Initialize Auth0 class on web.

Implementation

Future<auth0_web.Auth0> initAuth0Web({
  required String auth0Domain,
  required String auth0ClientId,
  String? redirectUri,
}) async {
  try {
    return auth0_web.createAuth0Client(
      auth0_web.Auth0ClientOptions(
        domain: auth0Domain,
        client_id: auth0ClientId,
        redirect_uri: redirectUri,
        useRefreshTokens: true,
        cacheLocation: "localstorage",
      ),
    );
  } catch (e) {
    throw Exception(e);
  }
}