Packages@robojs/auth
signOut()
Function: signOut()
Call Signature
function signOut(options?): Promise<Response>Calls the Auth.js sign-out route to remove the active session.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | ClientOptions | Overrides for base path, headers, or a custom fetch implementation. |
Returns
Promise<Response>
A Response emitted by the /signout endpoint.
Examples
await signOut()await signOut({ fetch: myEdgeSafeFetch })Call Signature
function signOut(
params?,
proxy?,
redirect?): Promise<
| Response
| {
error: string;
ok: boolean;
url: string;
}
| {
ok: true;
redirected: true;
}
| {
ok: true;
url: string;
}>Calls the Auth.js sign-out route to remove the active session.
Parameters
| Parameter | Type |
|---|---|
params? | { callbackUrl: string; csrfToken: string; } |
params.callbackUrl? | string |
params.csrfToken? | string |
proxy? | ClientOptions |
redirect? | RedirectMode |
Returns
Promise<
| Response
| {
error: string;
ok: boolean;
url: string;
}
| {
ok: true;
redirected: true;
}
| {
ok: true;
url: string;
}>
A Response emitted by the /signout endpoint.
Examples
await signOut()await signOut({ fetch: myEdgeSafeFetch })