-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7794b6d
commit 84e14d7
Showing
9 changed files
with
537 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
label: "API" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: "client" | ||
--- | ||
|
||
# client | ||
|
||
## Functions | ||
|
||
### signIn() | ||
|
||
#### Signature | ||
|
||
```ts | ||
signIn<P>(providerId?: LiteralUnion<P extends RedirectableProviderType ? BuiltInProviderType | P : BuiltInProviderType, string>, options?: SignInOptions, authorizationParams?: SignInAuthorizationParams): Promise<undefined | Response> | ||
``` | ||
|
||
Client-side method to initiate a signin flow | ||
or send the user to the signin page listing all possible providers. | ||
Automatically adds the CSRF token to the request. | ||
|
||
[Documentation](https://authjs.dev/reference/utilities/#signin) | ||
|
||
#### Type parameters | ||
|
||
- `P` *extends* `undefined` \| `RedirectableProviderType` = `undefined` | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `providerId?` | `LiteralUnion`<`P` extends `RedirectableProviderType` ? `BuiltInProviderType` \| `P` : `BuiltInProviderType`, `string`\> | | ||
| `options?` | `SignInOptions` | | ||
| `authorizationParams?` | `SignInAuthorizationParams` | | ||
|
||
#### Returns | ||
|
||
`Promise`<`undefined` \| [Response]( https://developer.mozilla.org/en-US/docs/Web/API/Response )\> | ||
|
||
--- | ||
|
||
### signOut() | ||
|
||
#### Signature | ||
|
||
```ts | ||
signOut(options?: SignOutParams<true>): Promise<void> | ||
``` | ||
|
||
Signs the user out, by removing the session cookie. | ||
Automatically adds the CSRF token to the request. | ||
|
||
[Documentation](https://authjs.dev/reference/utilities/#signout) | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `options?` | `SignOutParams`<`true`\> | | ||
|
||
#### Returns | ||
|
||
`Promise`<`void`\> |
Oops, something went wrong.