Type Alias GetUserFunction

GetUserFunction: ((forceRefresh?: boolean) => Promise<User | null>)

Function type for getting the current user. Used as an alternative to passing an Auth instance. This function should return fresh tokens from the session manager.

Type declaration

    • (forceRefresh?): Promise<User | null>
    • Parameters

      • OptionalforceRefresh: boolean

        When true, the auth layer should trigger a server-side token refresh to get updated claims (e.g., after zkEVM registration). This ensures the returned user has the latest data from the identity provider.

      Returns Promise<User | null>