INIT_OTP_AUTH_V2
activity. The difference between it and INIT_OTP_AUTH
is that it can now accept alphanumeric
and otpLength
for selecting crockford bech32 alphanumeric codes and the length of those codes. By default alphanumeric = true, otpLength = 9
sendFromEmailSenderName
to INIT_OTP_AUTH
, INIT_OTP_AUTH_V2
, EMAIL_AUTH
and EMAIL_AUTH_V2
. This is an optional custom sender name for use with sendFromEmailAddress; if left empty, will default to ‘Notifications’.
clearEmbeddedKey()
async function, which clears the embedded key within an iframeinitEmbeddedKey()
async function, which reinitializes the embedded key within an iframegetEmbeddedPublicKey()
via TurnkeyIframeClient
. This can be used to fetch the live public key of the target embedded key living within an iframe.
Usage may look like the following:
iframeStamper.iframePublicKey
exposed by @turnkey/iframe-stamper
’s publicKey()
method.
./__types__/base.ts
TurnkeyBrowserClient
refereshSession()
now consumes a RefreshSessionParams parameterloginWithBundle()
now consumes a LoginWithBundleParams parameterloginWithPasskey()
now consumes a LoginWithPasskeyParams parameterloginWithWallet()
now consumes a LoginWithWalletParams parameterAuth.tsx
passkeyClient?.loginWithPasskey()
to implement new method signaturewalletClient?.loginWithWallet()
to implement new method signature./__types__/base.ts
TurnkeyBrowserClient.login()
to align with other functions like loginWithPasskey()
and loginWithWallet()
TurnkeyBaseClient
class which extends TurnkeySDKClientBase
TurnkeyBrowserClient
, TurnkeyIframeClient
, TurnkeyPasskeyClient
, and TurnkeyWalletClient
all extend TurnkeyBaseClient
refreshSession
- attempts to refresh an existing, active session and will extend the session expiry using the expirationSeconds
parameterSession
, which can be either read-only or read-write, created via a server action and attempts to authenticate the userTurnkeyContext
to use new .getSession()
method to check if there is an active sessionOTPVerification
component no longer receives authIframeClient
or onValidateSuccess
propssendCredential
server actionSessionType
enum
READ_ONLY
& READ_WRITE
package.json
peerDependencies
to dependencies
"@turnkey/http": "workspace:*"
"@turnkey/sdk-browser": "workspace:*"
devDependencies
to dependencies
"@turnkey/api-key-stamper": "workspace:*"
TurnkeyWalletClient
TurnkeyWalletClient
to the @turnkey/sdk-browser
Reason: Allows using the WalletStamper
with the browser sdkgetPublicKey
method to TurnkeyWalletClient
Reason: Enables easy access to wallet public key for sub-organization creation and future authentication flowsTurnkeyWalletClient
to use new WalletInterface
Reason: Ensures compatibility with the updated Wallet Stamper interfacesAuthClient
(new enum)TurnkeyBrowserClient
, TurnkeyIframeClient
, TurnkeyPasskeyClient
, TurnkeyWalletClient
authClient
property to base TurnkeyBrowserClient
to be used by the child classes to track which client was used for the initial authenticationUserSession
interfaceUserSession
interface which is to be stored in local storage to track the authentication state of the user and to eliminate the need to store the write and read sessions separately.authClient
in the session object to store the authentication method used in the user’s session data. Will be used in the @turnkey/sdk-react
to determine which client to return.UserSession
key: "@turnkey/session/v1"
login
and loginWithReadWriteSession
methodsauthClient
property to track and store the authentication method used during loginactivityPoller
parameter for configuring polling behaviororganizationId
override for TurnkeyBrowserClient.login
with an extra config
argumentgetAuthBundle()
path for passkey sessions and replace it with getReadWriteSession()
to store authBundles with their expirationTimestamps so applications can better manually manage active writing sessions