Class

EnterpriseClient

EnterpriseClient()

A class that handles communication with the Hanko API for the purposes of authenticating through a third party provider.
Constructor

# new EnterpriseClient()

View Source lib/client/EnterpriseClient.ts, line 13

Extends

Members

Methods

# auth(email, redirectTo) → {void}

Performs a request to the Hanko API that redirects to the given third party provider.
Parameters:
Name Type Description
email string E-Mail address of the user
redirectTo string The URL to redirect to after a successful third party authentication
See:

View Source lib/client/EnterpriseClient.ts, line 137

void

# getError() → {ThirdPartyError|undefined}

Get a third party error from the current location's query params.

View Source lib/client/EnterpriseClient.ts, line 143

The ThirdPartyError.
ThirdPartyError | undefined

# async hasProvider(email) → {Promise.<boolean>}

Performs a request to the Hanko API to check if there is a provider for the users e-mail domain
Parameters:
Name Type Description
email string E-Mail address of the user to login

View Source lib/client/EnterpriseClient.ts, line 125

Promise.<boolean>