Interface: IAuthService
Defined in: src/types/services.ts:25
Authentication service injected into the runtime.
Remarks
Replaces useAuthContext() from @picsart/growth-rc.
Methods
getHeaders()
getHeaders():
Record<string,string>
Defined in: src/types/services.ts:27
Get current auth headers (e.g., Authorization: Bearer ...)
Returns
Record<string, string>
getRefreshedHeaders()
getRefreshedHeaders():
Promise<Record<string,string>>
Defined in: src/types/services.ts:30
Get refreshed auth headers (re-fetches token if needed)
Returns
Promise<Record<string, string>>
getStatus()
getStatus():
IAuthStatus
Defined in: src/types/services.ts:33
Get current auth status
Returns
getUser()?
optionalgetUser():IContextUser|null
Defined in: src/types/services.ts:39
Get current user info
Returns
IContextUser | null
onRedirect()
onRedirect():
void
Defined in: src/types/services.ts:36
Handle auth redirect (e.g., after login)
Returns
void
signout()?
optionalsignout():void
Defined in: src/types/services.ts:42
Sign out the current user and clear the session
Returns
void