SuperTokens class

Primary class for the supertokens package Use SuperTokens.initialise to initialise the package, do this before making any network calls

Constructors

SuperTokens()

Properties

hashCode → int
The hash code for this object.
read-onlyinherited
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

config ↔ dynamic
read / write
isInitCalled ↔ bool
read / write
refreshTokenUrl ↔ String
read / write
rid ↔ String
read / write
sessionExpiryStatusCode ↔ int
read / write
signOutUrl ↔ String
read / write

Static Methods

attemptRefreshingSession() → Future<bool>
doesSessionExist() → Future<bool>
Use this function to verify if a users session is valid
getAccessToken() → Future<String?>
getAccessTokenPayloadSecurely() → Future<Map<String, dynamic>>
getUserId() → Future<String>
init({required String apiDomain, String? apiBasePath, int? maxRetryAttemptsForSessionRefresh, int sessionExpiredStatusCode = 401, String? sessionTokenBackendDomain, SuperTokensTokenTransferMethod? tokenTransferMethod, dynamic eventHandler(Eventype)?, dynamic preAPIHook(APIAction, dynamic)?, dynamic postAPIHook(APIAction, dynamic, dynamic)?, bool? enableDebugLogs}) → void
signOut({dynamic completionHandler(Exception?)?}) → Future<void>