@turnkey/sdk-react-native

1.3.3

Patch Changes

  • Updated dependencies [5f3dd98, 7625df0, 878e039]:
    • @turnkey/http@3.5.0
    • @turnkey/api-key-stamper@0.4.7
    • @turnkey/crypto@2.4.1
    • @turnkey/react-native-passkey-stamper@1.0.17

1.3.2

Patch Changes

  • Updated dependencies [be0a621]:
    • @turnkey/http@3.4.2
    • @turnkey/crypto@2.4.0
    • @turnkey/react-native-passkey-stamper@1.0.16

1.3.1

Patch Changes

  • Updated dependencies [40c4035, 10ee5c5, 593de2d]:
    • @turnkey/encoding@0.5.0
    • @turnkey/crypto@2.4.0
    • @turnkey/http@3.4.1
    • @turnkey/api-key-stamper@0.4.6
    • @turnkey/react-native-passkey-stamper@1.0.15

1.3.0

Minor Changes

  • #622 59f8941 Author @moeodeh3 - Added support for React 19

    Renamed sessionKey parameter to storageKey in createEmbeddedKey saveEmbeddedKey and getEmbeddedKey.

    Added optional embeddedStorageKey parameter to createSession. This allows for retrieval of the embedded key from a custom location in secure storage.

Patch Changes

  • #641 77611c8 Author @amircheikh - Added onSessionEmpty. A callback function that runs when there is no active session on app launch.

  • Updated dependencies [07dfd33]:

    • @turnkey/http@3.4.0
    • @turnkey/crypto@2.3.1
    • @turnkey/react-native-passkey-stamper@1.0.14

1.2.3

Patch Changes

  • Updated dependencies [25ca339]
    • @turnkey/http@3.3.0
    • @turnkey/crypto@2.3.1
    • @turnkey/react-native-passkey-stamper@1.0.13

1.2.2

Patch Changes

  • ef399e1: - Eliminated a race condition in refreshSession that could throw: TurnkeyReactNativeError: Embedded key not found when refreshing the session

    • The embedded key is now generated entirely in memory using generateP256KeyPair
    • Removed the need to store and immediately retrieve the private key from secure storage
    • refreshSession now accepts a single optional parameter object
    • StorageKeys.RefreshEmbeddedKey is now deprecated and no longer used during session refresh
  • Updated dependencies [3f6e415]

  • Updated dependencies [4d1d775]

    • @turnkey/http@3.2.0
    • @turnkey/api-key-stamper@0.4.5
    • @turnkey/crypto@2.3.1
    • @turnkey/react-native-passkey-stamper@1.0.12

1.2.1

Patch Changes

  • Updated dependencies [3e4a482]
    • @turnkey/http@3.1.0
    • @turnkey/crypto@2.3.1
    • @turnkey/react-native-passkey-stamper@1.0.11

1.2.0

Minor Changes

  • ab45d29: Added createSessionFromEmbeddedKey function. This allows creation of a session using a compressed embedded key stored by calling createEmbeddedKey. You may also optionally pass in an embedded key created seperately. Utilizing these two functions with a createSuborg api call allows for a ‘1 tap’ passkey sign up flow (example).

    Added optional isCompressed boolean field to the createEmbeddedKey function. This field is necessary for calling createSessionFromEmbeddedKey.

1.1.0

Minor Changes

  • e8bc05b: Introduces handleGoogleOAuth(): Adds a utility function to handle the Google OAuth authentication flow in React Native.

Usage Summary:
handleGoogleOAuth launches an InAppBrowser to initiate the OAuth flow using your client ID, nonce, and app scheme. After a successful login, it extracts the oidcToken from the redirect URL and calls your onSuccess callback with the token.

handleGoogleOAuth({
  clientId: string,           // Google OAuth client ID
  nonce: string,              // Random nonce
  scheme: string,             // App’s custom URL scheme (e.g., "myapp")
  originUri?: string,         // Optional custom origin URI - defaults to Turnkey proxies
  redirectUri?: string,       // Optional custom redirect URI - defaults to Turnkey proxies
  onSuccess: (oidcToken: string) => void, // Called with token on success
});

1.0.5

Patch Changes

  • 3b5b360: - Adds optional parameter for createEmbeddedKey():
    • You can now pass a sessionKey to createEmbeddedKey() to generate separate embedded keys for different sessions, which is helpful when running multiple authentication flows concurrently.
    • Introduces onSessionExpiryWarning():
      • You can now add a callback via the provider config that triggers 15 seconds before a session expires.
    • Introduces refreshSession():
      • You now can refresh an active session that is about to expire.

1.0.4

Patch Changes

  • Updated dependencies [d1083bd]
  • Updated dependencies [f94d36e]
    • @turnkey/http@3.0.0
    • @turnkey/crypto@2.3.1

1.0.3

Minor Changes

  • a7e7de0: Fixed compatibility issue with @turnkey/viem

1.0.2

Patch Changes

  • Updated dependencies [ecdb29a]
    • @turnkey/http@2.22.0
    • @turnkey/crypto@2.3.1

1.0.1

Patch Changes

  • Updated dependencies [56a307e]
    • @turnkey/http@2.21.0
    • @turnkey/crypto@2.3.1

1.0.0

Major Changes

  • fcf9503: This breaking change adds support for multiple sessions:

    • The concept of a selected session has been introduced:
      • Users can switch between sessions using setSelectedSession({ sessionKey: <key> }).
      • The selected session determines the active client, user, and session state.
      • API calls such as updateUser, createWallet, and signRawPayload now apply to the selected session.
    • A session limit of 15 active sessions has been enforced:
      • If the limit is reached, users must remove an existing session before creating a new one.
      • Expired or invalid sessions are automatically cleaned up.

0.1.1

Patch Changes

  • Updated dependencies [3c44c4a]
    • @turnkey/http@2.20.0
    • @turnkey/crypto@2.3.1