@privy-io/react-auth 1.31.0-beta.4 → 1.31.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1403,12 +1403,14 @@ type PrivyEvents = {
1403
1403
  * this will run after the user successfully authenticates.
1404
1404
  * - If `config.embeddedWallets.createOnLogin` is set to 'users-without-wallets' or 'all-users',
1405
1405
  * this will run after the user successfully authenticates _and_ creates their wallet (if applicable).
1406
+ * - If a user is already authenticated, this will run immediately and the `wasAlreadyAuthenticated` flag will be set to `true`.
1406
1407
  *
1407
1408
  * @param user {User} - the `user` oject corresponding to the authenticated user
1408
1409
  * @param isNewUser {boolean} - boolean flag indicating if this is the user's first time logging in to your app
1410
+ * @param wasAlreadyAuthenticated {boolean} - boolean flag indicating whether the user entered the application already authenticated
1409
1411
  *
1410
1412
  */
1411
- onSuccess?: (user: User, isNewUser: boolean) => void;
1413
+ onComplete?: (user: User, isNewUser: boolean, wasAlreadyAuthenticated: boolean) => void;
1412
1414
  /**
1413
1415
  * Callback that will execute in the case of a non-successful login.
1414
1416
  *