ConvexTokenProvider class

Caches the Convex JWT and refreshes it shortly before it expires.

Constructors

ConvexTokenProvider(ConvexBetterAuth _api, {Duration leeway = const Duration(seconds: 30)})

Properties

hashCode → int
The hash code for this object.
no setterinherited
leeway → Duration
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
fetchToken({bool forceRefreshToken = false}) → Future<String?>
Shape of Convex's fetchToken({forceRefreshToken}) callback. Returns the cached token unless forceRefreshToken is set or it is close to expiry; null when signed out or the request fails.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited