Search
Preparing search index...
The search index is not available
supertokens-auth-react
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
supertokens-auth-react
recipe/session
default
Class default
Hierarchy
default
Index
Constructors
constructor
Properties
Components
Override
Provider
Session
Auth
use
Claim
Value
use
Session
Context
Methods
add
Axios
Interceptors
attempt
Refreshing
Session
does
Session
Exist
get
Access
Token
get
Access
Token
Payload
Securely
get
Claim
Value
get
Invalid
Claims
From
Response
get
User
Id
init
sign
Out
validate
Claims
Constructors
constructor
new default
(
)
:
default
Returns
default
Properties
Static
Components
Override
Provider
Components
Override
Provider
:
FC
<
PropsWithChildren
<
{
components
:
ComponentOverrideMap
}
>
>
= RecipeComponentsOverrideContextProvider
Static
Session
Auth
Session
Auth
:
FC
<
PropsWithChildren
<
SessionAuthProps
&
{
userContext
?:
UserContext
}
>
>
= SessionAuthWrapper
Static
use
Claim
Value
use
Claim
Value
:
(
<
T
>
(
claim
:
SessionClaim
<
T
>
)
=>
{
loading
:
true
}
|
{
doesSessionExist
:
boolean
;
loading
:
false
;
value
:
undefined
|
T
}
)
= useClaimValueFunc
Type declaration
<
T
>
(
claim
:
SessionClaim
<
T
>
)
:
{
loading
:
true
}
|
{
doesSessionExist
:
boolean
;
loading
:
false
;
value
:
undefined
|
T
}
Type Parameters
T
Parameters
claim:
SessionClaim
<
T
>
Returns
{
loading
:
true
}
|
{
doesSessionExist
:
boolean
;
loading
:
false
;
value
:
undefined
|
T
}
Static
use
Session
Context
use
Session
Context
:
(
(
)
=>
SessionContextType
)
= useSessionContextFunc
Type declaration
(
)
:
SessionContextType
Returns
SessionContextType
Methods
Static
add
Axios
Interceptors
add
Axios
Interceptors
(
axiosInstance
:
any
, userContext
?:
UserContext
)
:
void
deprecated
Parameters
axiosInstance:
any
Optional
userContext:
UserContext
Returns
void
Static
attempt
Refreshing
Session
attempt
Refreshing
Session
(
)
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
Static
does
Session
Exist
does
Session
Exist
(
input
?:
{
userContext
?:
UserContext
}
)
:
Promise
<
boolean
>
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
Promise
<
boolean
>
Static
get
Access
Token
get
Access
Token
(
input
?:
{
userContext
?:
UserContext
}
)
:
Promise
<
undefined
|
string
>
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
Promise
<
undefined
|
string
>
Static
get
Access
Token
Payload
Securely
get
Access
Token
Payload
Securely
(
input
?:
{
userContext
?:
UserContext
}
)
:
Promise
<
any
>
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
Promise
<
any
>
Static
get
Claim
Value
get
Claim
Value
<
T
>
(
input
:
{
claim
:
SessionClaim
<
T
>
;
userContext
?:
UserContext
}
)
:
Promise
<
undefined
|
T
>
Type Parameters
T
Parameters
input:
{
claim
:
SessionClaim
<
T
>
;
userContext
?:
UserContext
}
claim
:
SessionClaim
<
T
>
Optional
user
Context
?:
UserContext
Returns
Promise
<
undefined
|
T
>
Static
get
Invalid
Claims
From
Response
get
Invalid
Claims
From
Response
(
input
:
{
response
:
Response
|
{
data
:
any
}
;
userContext
:
UserContext
}
)
:
Promise
<
ClaimValidationError
[]
>
Parameters
input:
{
response
:
Response
|
{
data
:
any
}
;
userContext
:
UserContext
}
response
:
Response
|
{
data
:
any
}
user
Context
:
UserContext
Returns
Promise
<
ClaimValidationError
[]
>
Static
get
User
Id
get
User
Id
(
input
?:
{
userContext
?:
UserContext
}
)
:
Promise
<
string
>
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
Promise
<
string
>
Static
init
init
(
config
?:
InputType
)
:
RecipeInitResult
<
unknown
,
unknown
,
unknown
,
any
>
Parameters
Optional
config:
InputType
Returns
RecipeInitResult
<
unknown
,
unknown
,
unknown
,
any
>
Static
sign
Out
sign
Out
(
input
?:
{
userContext
?:
UserContext
}
)
:
Promise
<
void
>
Parameters
Optional
input:
{
userContext
?:
UserContext
}
Optional
user
Context
?:
UserContext
Returns
Promise
<
void
>
Static
validate
Claims
validate
Claims
(
input
?:
{
userContext
?:
UserContext
;
overrideGlobalClaimValidators
?:
any
}
)
:
ClaimValidationError
[]
|
Promise
<
ClaimValidationError
[]
>
Parameters
Optional
input:
{
userContext
?:
UserContext
;
overrideGlobalClaimValidators
?:
any
}
Optional
user
Context
?:
UserContext
override
Global
Claim
Validators
?:
function
override
Global
Claim
Validators
(
globalClaimValidators
:
SessionClaimValidator
[]
, userContext
:
UserContext
)
:
SessionClaimValidator
[]
Parameters
globalClaimValidators:
SessionClaimValidator
[]
userContext:
UserContext
Returns
SessionClaimValidator
[]
Returns
ClaimValidationError
[]
|
Promise
<
ClaimValidationError
[]
>
Modules
date
Provider
index
recipe/auth
Recipe
recipe/emailpassword
recipe/emailverification
recipe/multifactorauth
recipe/multitenancy
recipe/oauth2provider
recipe/passwordless
recipe/recipe
Module
recipe/session
recipe/thirdparty
recipe/totp
recipe/userroles
default
constructor
Components
Override
Provider
Session
Auth
use
Claim
Value
use
Session
Context
add
Axios
Interceptors
attempt
Refreshing
Session
does
Session
Exist
get
Access
Token
get
Access
Token
Payload
Securely
get
Claim
Value
get
Invalid
Claims
From
Response
get
User
Id
init
sign
Out
validate
Claims
Generated using
TypeDoc