Skip to content

Commit

Permalink
fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Feb 3, 2023
1 parent 7794b6d commit 84e14d7
Show file tree
Hide file tree
Showing 9 changed files with 537 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pnpm-lock.yaml

.docusaurus
build
docs/docs/reference/03-core
docs/docs/reference/04-sveltekit
docs/docs/reference/core
docs/docs/reference/sveltekit
static

# --------------- Packages ---------------
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ packages/core/lib
packages/core/providers
packages/core/src/lib/pages/styles.ts
docs/docs/reference/core
docs/docs/reference/04-sveltekit
docs/docs/reference/sveltekit


# SvelteKit
Expand Down
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pnpm-lock.yaml

.docusaurus
build
docs/docs/reference/03-core
docs/docs/reference/04-sveltekit
docs/docs/reference/core
docs/docs/reference/sveltekit
static
docs/providers.json

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/03-basics/refresh-token-rotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Using a JWT to store the `refresh_token` is less secure than saving it in a data

#### JWT strategy

Using the [jwt](../../reference/03-core/interfaces/types.CallbacksOptions.md#jwt) and [session](../../reference/03-core/interfaces/types.CallbacksOptions.md#session) callbacks, we can persist OAuth tokens and refresh them when they expire.
Using the [jwt](../../reference/core/interfaces/types.CallbacksOptions.md#jwt) and [session](../../reference/core/interfaces/types.CallbacksOptions.md#session) callbacks, we can persist OAuth tokens and refresh them when they expire.

Below is a sample implementation using Google's Identity Provider. Please note that the OAuth 2.0 request in the `refreshAccessToken()` function will vary between different providers, but the core logic should remain similar.

Expand Down
1 change: 1 addition & 0 deletions docs/docs/reference/04-sveltekit/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: "API"
62 changes: 62 additions & 0 deletions docs/docs/reference/04-sveltekit/client.md
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`\>
Loading

0 comments on commit 84e14d7

Please sign in to comment.