1
Initialize Turnkey
2
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.3
Call emailAuth from your backend
subOrganizationId by email, you can call the getSubOrgIds method with the filterType parameter set to "EMAIL"4
Inject the emailed credentialBundle into the iframe to authenticate the user
5
Make read requests on behalf of the authenticated user from the currentUserSession
6
Call the `iframeClient` directly for write requests