Authenticate a User with Email
Initialize Turnkey
Initialize the Iframe Client
Note that the iframe client must be initialized with the dom element where the iframe will be injected. If you are using the react-sdk you can import the iframeClient
from the useTurnkey()
hook without this step and the iframe dom element will be managed for you. Note that the iframeClient
must be initialized before calling emailAuth
because you need the iframePublicKey
as a parameter to the emailAuth
call.
Call emailAuth from your backend
If you need to lookup the user subOrganizationId
by email, you can call the getSubOrgIds
method with the filterType
parameter set to "EMAIL"
Inject the emailed credentialBundle into the iframe to authenticate the user
Make read requests on behalf of the authenticated user from the currentUserSession
Call the `iframeClient` directly for write requests
Was this page helpful?