CrossmintClient.auth.
state (immediate), stateListenable (Flutter
ValueListenable), or states (Stream). Call restoreSession on
app startup (once CrossmintClient.initialize has completed) so any
persisted JWT can hydrate before the first frame.
Properties
state
stateListenable
state — suitable for ValueListenableBuilder.
states
Methods
restoreSession
CrossmintAuthStorage and applies it to the client. Safe to call once per app launch — prefer using the result of CrossmintClient.initialize which calls this internally.
loginWithOAuth
provider (Google, Twitter, etc.). The response comes back through CrossmintAuthCallbackRouter — make sure it is started before calling this.
sendEmailOtp
email. Returns a challenge that confirmEmailOtp completes.
confirmEmailOtp
emailId from the challenge and the token the user entered. Returns true on success.
completeOAuth
CrossmintAuthCallbackRouter; call directly only for custom routing.
completeOAuthWithOneTimeSecret
true on success.
signInWithWallet
type is 'evm' or 'solana'.
authenticateWallet
getSession
null if not signed in. Does not hit the network — reads from in-memory state.
getUser
forceRefresh: true to bypass the cache and refetch.

