InputType
InputType: { apiBasePath?: string; apiDomain: string; autoAddCredentials?: boolean; enableDebugLogs?: boolean; maxRetryAttemptsForSessionRefresh?: number; onHandleEvent?: EventHandler; override?: { functions?: any }; sessionExpiredStatusCode?: number; sessionTokenBackendDomain?: string; tokenTransferMethod?: "cookie" | "header"; preAPIHook?: any }
Type declaration
Optional apiBasePath?: string
apiDomain: string
Optional autoAddCredentials?: boolean
Optional enableDebugLogs?: boolean
Optional maxRetryAttemptsForSessionRefresh?: number
Optional onHandleEvent?: EventHandler
Optional override?: { functions?: any }
Optional sessionExpiredStatusCode?: number
Optional sessionTokenBackendDomain?: string
Optional tokenTransferMethod?: "cookie" | "header"
preAPIHook?:function
- preAPIHook(context: { action: "SIGN_OUT" | "REFRESH_SESSION"; requestInit: RequestInit; url: string }): Promise<{ requestInit: RequestInit; url: string }>
Parameters
context: { action: "SIGN_OUT" | "REFRESH_SESSION"; requestInit: RequestInit; url: string }
action: "SIGN_OUT" | "REFRESH_SESSION"
requestInit: RequestInit
url: string
Returns Promise<{ requestInit: RequestInit; url: string }>
This specifies the maximum number of times the interceptor will attempt to refresh the session when a 401 Unauthorized response is received. If the number of retries exceeds this limit, no further attempts will be made to refresh the session, and and an error will be thrown.