Initialize Turnkey
Initialize the Iframe Client
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
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