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.
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

apiDomain String?
getter/setter pair
isInitCalled bool
getter/setter pair
refreshAPICustomHeaders Map<String, String>?
getter/setter pair
refreshTokenEndpoint String
getter/setter pair
sessionExpiryStatusCode int
getter/setter pair

Static Methods

doesSessionExist() Future<bool>
Use this function to verify if a users session is valid
initialise({required String refreshTokenEndpoint, int sessionExpiryStatusCode = 401, Map<String, String> refreshAPICustomHeaders = const {}}) → void
Initialises the SuperTokens SDK Uses the refreshTokenEndpoint to make a call to refresh the session when needed, the sessionExpiryStatusCode is used to determine unauthorised access API errors. refreshAPICustomHeaders are always sent when calling the refresh endpoint. Throws a FormatException if an invalid URL is provided for refreshTokenEndpoint.