SuperTokens class

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

Constructors

SuperTokens.new()

Properties

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

Methods

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

Static Properties

config ↔ NormalisedInputType
getter/setter pair
isInitCalled bool
getter/setter pair
refreshTokenUrl String
getter/setter pair
rid String
getter/setter pair
sessionExpiryStatusCode int
getter/setter pair
signOutUrl String
getter/setter pair

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)?, Request preAPIHook(APIAction, Request)?, dynamic postAPIHook(APIAction, Request, Response)?, bool? enableDebugLogs}) → void
signOut({dynamic completionHandler(Exception?)?}) Future<void>