These are the SDK reference docs. If you’re looking for docs to implement SuperTokens, you might want to check out the User Guides

Index

Type Aliases

InputType: WebJSInputType & { onHandleEvent?: any }
RecipeInterface: { addAxiosInterceptors: any; addFetchInterceptorsAndReturnModifiedFetch: any; doesSessionExist: any; getAccessTokenPayloadSecurely: any; getUserId: any; signOut: any }

Type declaration

  • addAxiosInterceptors:function
    • addAxiosInterceptors(input: { axiosInstance: any; userContext: any }): void
    • Parameters

      • input: { axiosInstance: any; userContext: any }
        • axiosInstance: any
        • userContext: any

      Returns void

  • addFetchInterceptorsAndReturnModifiedFetch:function
    • addFetchInterceptorsAndReturnModifiedFetch(input: { originalFetch: any; userContext: any }): ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)
    • Parameters

      • input: { originalFetch: any; userContext: any }
        • originalFetch: any
        • userContext: any

      Returns ((input: URL | RequestInfo, init?: RequestInit) => Promise<Response>)

        • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
        • Parameters

          • input: URL | RequestInfo
          • Optional init: RequestInit

          Returns Promise<Response>

  • doesSessionExist:function
    • doesSessionExist(input: { userContext: any }): Promise<boolean>
    • Parameters

      • input: { userContext: any }
        • userContext: any

      Returns Promise<boolean>

  • getAccessTokenPayloadSecurely:function
    • getAccessTokenPayloadSecurely(input: { userContext: any }): Promise<any>
    • Parameters

      • input: { userContext: any }
        • userContext: any

      Returns Promise<any>

  • getUserId:function
    • getUserId(input: { userContext: any }): Promise<string>
    • Parameters

      • input: { userContext: any }
        • userContext: any

      Returns Promise<string>

  • signOut:function
    • signOut(input: { userContext: any }): Promise<void>
    • Parameters

      • input: { userContext: any }
        • userContext: any

      Returns Promise<void>

SessionContextType: { accessTokenPayload: any; doesSessionExist: boolean; loading: false; userId: string } | { loading: true }

Variables

SessionAuth: FC<PropsWithChildren<PropsWithoutAuth & { onSessionExpired?: any } & { userContext?: any } & PropsWithAuth & { onSessionExpired?: any } & { userContext?: any }>> = SessionAPIWrapper.SessionAuth
SessionContext: Context<{ accessTokenPayload: any; doesSessionExist: boolean; loading: false; userId: string } & { isDefault: boolean } & { loading: true } & { isDefault: boolean }> = ...

Functions

  • addAxiosInterceptors(axiosInstance: any, userContext?: any): void
  • attemptRefreshingSession(): Promise<boolean>
  • doesSessionExist(input?: { userContext?: any }): Promise<boolean>
  • getAccessTokenPayloadSecurely(input?: { userContext?: any }): Promise<any>
  • getUserId(input?: { userContext?: any }): Promise<string>
  • init(config?: InputType): CreateRecipeFunction<unknown, unknown, unknown, any>
  • signOut(input?: { userContext?: any }): Promise<void>

Generated using TypeDoc