- Preparing search index...
- The search index is not available
Stacks Connect
Constructors
constructor
- new UserSession(options?: {
appConfig?: AppConfig;
sessionOptions?: SessionOptions;
sessionStore?: SessionDataStore;
}): UserSession
-
Parameters
-
Optional
options: {
appConfig?: AppConfig;
sessionOptions?: SessionOptions;
sessionStore?: SessionDataStore;
}
-
Optional
appConfig?: AppConfig
-
Optional
sessionOptions?: SessionOptions
-
Optional
sessionStore?: SessionDataStore
Properties
appConfig
store
store: SessionDataStore
Methods
decryptContent
- decryptContent(content: string, options?: {
privateKey?: string;
}): Promise<string | Uint8Array>
-
Parameters
-
content: string
-
Optional
options: {
privateKey?: string;
}
-
Optional
privateKey?: string
Returns Promise<string | Uint8Array>
encryptContent
- encryptContent(content: string | Uint8Array, options?: EncryptContentOptions): Promise<string>
-
Parameters
-
content: string | Uint8Array
-
Optional
options: EncryptContentOptions
Returns Promise<string>
generateAndStoreTransitKey
- generateAndStoreTransitKey(): string
-
Returns string
getAuthResponseToken
- getAuthResponseToken(): string
-
Returns string
handlePendingSignIn
- handlePendingSignIn(authResponseToken?: string, fetchFn?: FetchFn): Promise<UserData>
-
Parameters
-
Optional
authResponseToken: string
-
Optional
fetchFn: FetchFn
Returns Promise<UserData>
isSignInPending
- isSignInPending(): boolean
-
Returns boolean
isUserSignedIn
- isUserSignedIn(): boolean
-
Returns boolean
loadUserData
- loadUserData(): UserData
-
makeAuthRequest
- makeAuthRequest(transitKey?: string, redirectURI?: string, manifestURI?: string, scopes?: string[], appDomain?: string, expiresAt?: number, extraParams?: any): string
-
Parameters
-
Optional
transitKey: string
-
Optional
redirectURI: string
-
Optional
manifestURI: string
-
Optional
scopes: string[]
-
Optional
appDomain: string
-
Optional
expiresAt: number
-
Optional
extraParams: any
Returns string
signUserOut
- signUserOut(redirectURL?: string): void
-
Parameters
-
Optional
redirectURL: string
Returns void