Compare commits

..

5 Commits

Author SHA1 Message Date
github-actions[bot]
6f419be2c1 chore: update versions (#2634)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @nhost/apollo@6.2.1

### Patch Changes

-   @nhost/nhost-js@3.0.11

## @nhost/react-apollo@11.0.1

### Patch Changes

-   @nhost/apollo@6.2.1
-   @nhost/react@3.4.1

## @nhost/react-urql@8.0.1

### Patch Changes

-   @nhost/react@3.4.1

## @nhost/hasura-auth-js@2.4.1

### Patch Changes

-   bcd889b: fix: change expiresAt format to RFC3339 in createPATPromise

## @nhost/nextjs@2.1.10

### Patch Changes

-   @nhost/react@3.4.1

## @nhost/nhost-js@3.0.11

### Patch Changes

-   Updated dependencies [bcd889b]
    -   @nhost/hasura-auth-js@2.4.1

## @nhost/react@3.4.1

### Patch Changes

-   @nhost/nhost-js@3.0.11

## @nhost/vue@2.5.1

### Patch Changes

-   @nhost/nhost-js@3.0.11

## @nhost/docs@2.9.0

### Minor Changes

-   3c31657: chore: update docs with provider connect

### Patch Changes

-   992939c: feat: added social connect docs

## @nhost/dashboard@1.12.1

### Patch Changes

- 93ebdf8: fix: use service urls when initilizaing NhostClient running
local dashboard
    -   @nhost/react-apollo@11.0.1
    -   @nhost/nextjs@2.1.10

## @nhost-examples/cli@0.3.1

### Patch Changes

-   @nhost/nhost-js@3.0.11

## @nhost-examples/codegen-react-apollo@0.4.1

### Patch Changes

-   @nhost/react@3.4.1
-   @nhost/react-apollo@11.0.1

## @nhost-examples/codegen-react-query@0.4.1

### Patch Changes

-   @nhost/react@3.4.1

## @nhost-examples/codegen-react-urql@0.3.1

### Patch Changes

-   @nhost/react@3.4.1
-   @nhost/react-urql@8.0.1

## @nhost-examples/multi-tenant-one-to-many@2.2.1

### Patch Changes

-   @nhost/nhost-js@3.0.11

## @nhost-examples/nextjs@0.3.1

### Patch Changes

-   @nhost/react@3.4.1
-   @nhost/react-apollo@11.0.1
-   @nhost/nextjs@2.1.10

## @nhost-examples/node-storage@0.2.1

### Patch Changes

-   @nhost/nhost-js@3.0.11

## @nhost-examples/nextjs-server-components@0.4.1

### Patch Changes

-   @nhost/nhost-js@3.0.11

## @nhost-examples/react-apollo@0.8.1

### Patch Changes

-   @nhost/react@3.4.1
-   @nhost/react-apollo@11.0.1

## @nhost-examples/react-gqty@1.2.1

### Patch Changes

-   @nhost/react@3.4.1

## @nhost-examples/vue-apollo@0.6.1

### Patch Changes

-   @nhost/nhost-js@3.0.11
-   @nhost/apollo@6.2.1
-   @nhost/vue@2.5.1

## @nhost-examples/vue-quickstart@0.2.1

### Patch Changes

-   @nhost/apollo@6.2.1
-   @nhost/vue@2.5.1

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-04 10:49:02 +01:00
Hassan Ben Jobrane
93ebdf844f fix: dashboard: use service urls when running locally with the cli (#2622) 2024-04-04 10:28:38 +01:00
Hassan Ben Jobrane
bcd889b53a fix: hasura-auth-js: use RFC3339 format for expiresAt when creating a PAT (#2637) 2024-04-03 21:40:02 +01:00
David Barroso
992939cdcd feat (docs): added social connect docs (#2633)
Co-authored-by: Nuno Pato <nunopato@gmail.com>
2024-04-03 16:37:07 +02:00
Nuno Pato
3c31657c50 chore: update docs with provider connect (#2632)
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-04-03 14:27:49 +00:00
103 changed files with 311 additions and 764 deletions

View File

@@ -1,5 +1,13 @@
# @nhost/dashboard
## 1.12.1
### Patch Changes
- 93ebdf8: fix: use service urls when initilizaing NhostClient running local dashboard
- @nhost/react-apollo@11.0.1
- @nhost/nextjs@2.1.10
## 1.12.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/dashboard",
"version": "1.12.0",
"version": "1.12.1",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",

View File

@@ -3,18 +3,14 @@ import {
getFunctionsServiceUrl,
getGraphqlServiceUrl,
getStorageServiceUrl,
isPlatform,
} from '@/utils/env';
import { NhostClient } from '@nhost/nextjs';
// eslint-disable-next-line no-nested-ternary
const nhost = isPlatform()
? new NhostClient({
authUrl: getAuthServiceUrl(),
graphqlUrl: getGraphqlServiceUrl(),
functionsUrl: getFunctionsServiceUrl(),
storageUrl: getStorageServiceUrl(),
})
: new NhostClient({ subdomain: 'local' });
const nhost = new NhostClient({
authUrl: getAuthServiceUrl(),
graphqlUrl: getGraphqlServiceUrl(),
functionsUrl: getFunctionsServiceUrl(),
storageUrl: getStorageServiceUrl(),
});
export default nhost;

View File

@@ -1,5 +1,15 @@
# @nhost/docs
## 2.9.0
### Minor Changes
- 3c31657: chore: update docs with provider connect
### Patch Changes
- 992939c: feat: added social connect docs
## 2.8.0
### Minor Changes

View File

@@ -0,0 +1,43 @@
---
title: Social Provider Connect
sidebarTitle: Social Provider Connect
description: Add social sign in mechanism to existing users
icon: link
---
With the social provider connect feature, users can link their social authentication method to their account, regardless of the initial sign-up method. It enables users to link different social authentication providers to their accounts, even if the email addresses do not match (e.g., linking a GitHub profile to an account registered with a different email). This feature offers flexibility, allowing users to streamline their login process by connecting multiple authentication methods.
To add a social authentication method to an existing user you need to call the url `https://${subdomain}.auth.${region}.nhost.run/v1/signin/provider/${provider}?connect=${jwt}`. This is very easy to achieve with our SDK:
``` js
nhost.auth.connectProvider({
provider: 'github'
})
```
In addition, hooks for react, vue and other frameworks may be provided. Check our [reference](/reference/overview#client-libraries) documentation for more details.
<Note>
Keep in mind that as we need a `JWT` the user needs to be logged in.
</Note>
## Viewing and Deleting Social Provider Authentication Mechanisms
If you want to allow your users to view and/or delete social provider authentication mechanisms, you can provide the necessary permissions to the table `auth.user_providers` (i.e. `select` and/or `delete`) and then use the appropriate GraphQL query. For example, the following permissions should allow users to list their own social providers:
![social connect permissions](/images/guides/auth/social-connect-permissions.png)
Using the following GraphQL query:
``` js
const { error, data } = await nhost.graphql.request(
gql`
query getAuthUserProviders {
authUserProviders {
id
providerId
}
}
`,
)
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

View File

@@ -128,6 +128,7 @@
"guides/auth/social/sign-in-workos"
]
},
"guides/auth/social-connect",
"guides/auth/sign-in-email-password",
"guides/auth/sign-in-magic-link",
"guides/auth/sign-in-phone-number",
@@ -197,7 +198,7 @@
"reference/auth/verfiy-fido2-webauthn-authentication-and-complete-signup",
"reference/auth/sign-in-using-email-via-fido2-webauthn-authentication",
"reference/auth/verfiy-fido2-webauthn-authentication-using-public-key-cryptography",
"reference/auth/elevate-webauthn",
"reference/auth/elevate-webauthn",
"reference/auth/elevate-webauthn-verify"
]
},
@@ -319,7 +320,8 @@
"reference/javascript/auth/sign-out",
"reference/javascript/auth/sign-up",
"reference/javascript/auth/add-security-key",
"reference/javascript/auth/elevate-email-security-key"
"reference/javascript/auth/elevate-email-security-key",
"reference/javascript/auth/connect-provider"
]
},
{

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/docs",
"version": "2.8.0",
"version": "2.9.0",
"private": true,
"scripts": {
"start": "mintlify dev"

View File

@@ -1,16 +0,0 @@
---
title: activateMfaPromise()
sidebarTitle: activateMfaPromise()
---
## Parameters
---
**<span className="parameter-name">service</span>** <span className="optional-status">required</span> <code>Interpreter&lt;EnableMfaContext, any, &#123; type: "GENERATE" &#125; &#124; &#123; type: "ACTIVATE", code: string, activeMfaType: "totp" &#125; &#124; &#123; type: "GENERATED" &#125; &#124; &#123; type: "GENERATED_ERROR", error: null &#124; AuthErrorPayload &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, &#123; value: any, context: EnableMfaContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "GENERATE" &#125; &#124; &#123; type: "ACTIVATE", code: string, activeMfaType: "totp" &#125; &#124; &#123; type: "GENERATED" &#125; &#124; &#123; type: "GENERATED_ERROR", error: null &#124; AuthErrorPayload &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, BaseActionObject, ServiceMap&gt;&gt;</code>
---
**<span className="parameter-name">code</span>** <span className="optional-status">required</span> <code>string</code>
---

View File

@@ -1,16 +0,0 @@
---
title: addSecurityKeyPromise()
sidebarTitle: addSecurityKeyPromise()
---
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> <code>AuthClient</code>
---
**<span className="parameter-name">nickname</span>** <span className="optional-status">optional</span> <code>string</code>
---

View File

@@ -1,24 +0,0 @@
---
title: changeEmailPromise()
sidebarTitle: changeEmailPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;ChangeEmailContext, any, &#123; type: "REQUEST", email: string, options: ChangeEmailOptions &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, &#123; value: any, context: ChangeEmailContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "REQUEST", email: string, options: ChangeEmailOptions &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, BaseActionObject, ChangeEmailServices&gt;&gt;</code>
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> [`ChangeEmailOptions`](/reference/javascript/auth/types/change-email-options)
| Property | Type | Required | Notes |
| :--------------------------------------------------------------------------------------------- | :------------------ | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">options.</span>redirectTo</span> | <code>string</code> | | Redirection path in the client application that will be used in the link in the verification email. For instance, if you want to redirect to `https://myapp.com/success`, the `redirectTo` value is `'/success'`. |
---

View File

@@ -1,20 +0,0 @@
---
title: changePasswordPromise()
sidebarTitle: changePasswordPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;ChangePasswordContext, any, &#123; type: "REQUEST", password: string, ticket: string &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, &#123; value: any, context: ChangePasswordContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "REQUEST", password: string, ticket: string &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, BaseActionObject, ChangePasswordServices&gt;&gt;</code>
---
**<span className="parameter-name">password</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">ticket</span>** <span className="optional-status">optional</span> <code>string</code>
---

View File

@@ -1,23 +0,0 @@
---
title: createAuthMachine()
sidebarTitle: createAuthMachine()
---
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> [`AuthMachineOptions`](/reference/javascript/auth/types/auth-machine-options)
| Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------- | :------: | :---------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>clientUrl</span> | <code>string</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>backendUrl</span> | <code>string</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>devTools</span> | <code>boolean</code> | | Activate devTools e.g. the ability to connect to the xstate inspector |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>autoSignIn</span> | <code>boolean</code> | | When set to true, will parse the url on startup to check if it contains a refresh token to start the session with |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>autoRefreshToken</span> | <code>boolean</code> | | When set to true, will automatically refresh token before it expires |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>clientStorage</span> | [`ClientStorage`](/reference/javascript/auth/types/client-storage) | | Object where the refresh token will be persisted and read locally. |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>clientStorageType</span> | [`ClientStorageType`](/reference/javascript/auth/types/client-storage-type) | | Define a way to get information about the refresh token and its exipration date. |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>refreshIntervalTime</span> | <code>number</code> | | Time interval until token refreshes, in seconds |
---

View File

@@ -1,12 +0,0 @@
---
title: createChangeEmailMachine()
sidebarTitle: createChangeEmailMachine()
---
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> <code>AuthClient</code>
---

View File

@@ -1,12 +0,0 @@
---
title: createChangePasswordMachine()
sidebarTitle: createChangePasswordMachine()
---
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> <code>AuthClient</code>
---

View File

@@ -1,12 +0,0 @@
---
title: createEnableMfaMachine()
sidebarTitle: createEnableMfaMachine()
---
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> <code>AuthClient</code>
---

View File

@@ -1,12 +0,0 @@
---
title: createResetPasswordMachine()
sidebarTitle: createResetPasswordMachine()
---
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> <code>AuthClient</code>
---

View File

@@ -1,12 +0,0 @@
---
title: createSendVerificationEmailMachine()
sidebarTitle: createSendVerificationEmailMachine()
---
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> <code>AuthClient</code>
---

View File

@@ -1,16 +0,0 @@
---
title: encodeQueryParameters()
sidebarTitle: encodeQueryParameters()
---
## Parameters
---
**<span className="parameter-name">baseUrl</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">parameters</span>** <span className="optional-status">optional</span> <code>Record&lt;string, unknown&gt;</code>
---

View File

@@ -1,12 +0,0 @@
---
title: generateQrCodePromise()
sidebarTitle: generateQrCodePromise()
---
## Parameters
---
**<span className="parameter-name">service</span>** <span className="optional-status">required</span> <code>Interpreter&lt;EnableMfaContext, any, &#123; type: "GENERATE" &#125; &#124; &#123; type: "ACTIVATE", code: string, activeMfaType: "totp" &#125; &#124; &#123; type: "GENERATED" &#125; &#124; &#123; type: "GENERATED_ERROR", error: null &#124; AuthErrorPayload &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, &#123; value: any, context: EnableMfaContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "GENERATE" &#125; &#124; &#123; type: "ACTIVATE", code: string, activeMfaType: "totp" &#125; &#124; &#123; type: "GENERATED" &#125; &#124; &#123; type: "GENERATED_ERROR", error: null &#124; AuthErrorPayload &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, BaseActionObject, ServiceMap&gt;&gt;</code>
---

View File

@@ -1,21 +0,0 @@
---
title: getAuthenticationResult()
sidebarTitle: getAuthenticationResult()
---
## Parameters
---
**<span className="parameter-name">\_\_namedParameters</span>** <span className="optional-status">required</span> [`SessionActionHandlerResult`](/reference/javascript/auth/types/session-action-handler-result)
| Property | Type | Required | Notes |
| :----------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------- | :------: | :------------------------------------------ |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>refreshToken</span> | <code>null &#124; string</code> | ✔️ | Access token (JWT) |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>accessToken</span> | <code>null &#124; string</code> | ✔️ | Access token (JWT) |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>user</span> | <code>null &#124; [`User`](/reference/javascript/auth/types/user)</code> | ✔️ | User information |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>isSuccess</span> | <code>boolean</code> | ✔️ | Returns `true` if the action is successful. |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>error</span> | <code>null &#124; [`AuthErrorPayload`](/reference/javascript/auth/types/auth-error-payload)</code> | ✔️ | Provides details about the error |
| <span className="parameter-name"><span className="light-grey">\_\_namedParameters.</span>isError</span> | <code>boolean</code> | ✔️ | |
---

View File

@@ -1,16 +0,0 @@
---
title: getFetch()
sidebarTitle: getFetch()
---
## Parameters
---
**<span className="parameter-name">url</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">token</span>** <span className="optional-status">optional</span> <code>null &#124; string</code>
---

View File

@@ -1,16 +0,0 @@
---
title: getParameterByName()
sidebarTitle: getParameterByName()
---
## Parameters
---
**<span className="parameter-name">name</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">url</span>** <span className="optional-status">optional</span> <code>string</code>
---

View File

@@ -1,22 +0,0 @@
---
title: getSession()
sidebarTitle: getSession()
---
## Parameters
---
**<span className="parameter-name">context</span>** <span className="optional-status">optional</span> [`AuthContext`](/reference/javascript/auth/types/auth-context)
| Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------- | :------: | :------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">context.</span>errors</span> | <code>Partial&lt;Record&lt;StateErrorTypes, AuthErrorPayload&gt;&gt;</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>importTokenAttempts</span> | <code>number</code> | ✔️ | Number of times the user tried to get an access token from a refresh token but got a network error |
| <span className="parameter-name"><span className="light-grey">context.</span>refreshToken</span> | <code>&#123; value: string &#124; null, isPAT: boolean &#125;</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>refreshTimer</span> | <code>&#123; startedAt: Date &#124; null, attempts: number, lastAttempt: Date &#124; null &#125;</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>accessToken</span> | <code>&#123; value: string &#124; null, expiresAt: Date &#124; null, expiresInSeconds: number &#124; null &#125;</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>mfa</span> | <code>&#123; ticket: string &#125; &#124; null</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>user</span> | <code>[`User`](/reference/javascript/auth/types/user) &#124; null</code> | ✔️ | |
---

View File

@@ -1,4 +0,0 @@
---
title: isBrowser()
sidebarTitle: isBrowser()
---

View File

@@ -1,12 +0,0 @@
---
title: isValidEmail()
sidebarTitle: isValidEmail()
---
## Parameters
---
**<span className="parameter-name">email</span>** <span className="optional-status">optional</span> <code>null &#124; string</code>
---

View File

@@ -1,12 +0,0 @@
---
title: isValidPassword()
sidebarTitle: isValidPassword()
---
## Parameters
---
**<span className="parameter-name">password</span>** <span className="optional-status">optional</span> <code>null &#124; string</code>
---

View File

@@ -1,12 +0,0 @@
---
title: isValidPhoneNumber()
sidebarTitle: isValidPhoneNumber()
---
## Parameters
---
**<span className="parameter-name">phoneNumber</span>** <span className="optional-status">optional</span> <code>null &#124; string</code>
---

View File

@@ -1,12 +0,0 @@
---
title: isValidTicket()
sidebarTitle: isValidTicket()
---
## Parameters
---
**<span className="parameter-name">ticket</span>** <span className="optional-status">optional</span> <code>null &#124; string</code>
---

View File

@@ -1,30 +0,0 @@
---
title: localStorageGetter()
sidebarTitle: localStorageGetter()
---
## Parameters
---
**<span className="parameter-name">clientStorageType</span>** <span className="optional-status">required</span> [`ClientStorageType`](/reference/javascript/auth/types/client-storage-type)
---
**<span className="parameter-name">clientStorage</span>** <span className="optional-status">optional</span> [`ClientStorage`](/reference/javascript/auth/types/client-storage)
| Property | Type | Required | Notes |
| :-------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>customSet</span> | <code>(key: string, value: null &#124; string) =&gt; void &#124; Promise&lt;void&gt;</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>customGet</span> | <code>(key: string) =&gt; null &#124; string &#124; Promise&lt;null &#124; string&gt;</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>deleteItemAsync</span> | <code>(key: string) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>getItemAsync</span> | <code>(key: string) =&gt; any</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>setItemAsync</span> | <code>(key: string, value: string) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>remove</span> | <code>(options: &#123; key: string &#125;) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>get</span> | <code>(options: &#123; key: string &#125;) =&gt; any</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>set</span> | <code>(options: &#123; key: string, value: string &#125;) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>removeItem</span> | <code>(key: string) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>getItem</span> | <code>(key: string) =&gt; any</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>setItem</span> | <code>(\_key: string, \_value: string) =&gt; void</code> | | |
---

View File

@@ -1,30 +0,0 @@
---
title: localStorageSetter()
sidebarTitle: localStorageSetter()
---
## Parameters
---
**<span className="parameter-name">clientStorageType</span>** <span className="optional-status">required</span> [`ClientStorageType`](/reference/javascript/auth/types/client-storage-type)
---
**<span className="parameter-name">clientStorage</span>** <span className="optional-status">optional</span> [`ClientStorage`](/reference/javascript/auth/types/client-storage)
| Property | Type | Required | Notes |
| :-------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>setItem</span> | <code>(\_key: string, \_value: string) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>getItem</span> | <code>(key: string) =&gt; any</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>removeItem</span> | <code>(key: string) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>set</span> | <code>(options: &#123; key: string, value: string &#125;) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>get</span> | <code>(options: &#123; key: string &#125;) =&gt; any</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>remove</span> | <code>(options: &#123; key: string &#125;) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>setItemAsync</span> | <code>(key: string, value: string) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>getItemAsync</span> | <code>(key: string) =&gt; any</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>deleteItemAsync</span> | <code>(key: string) =&gt; void</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>customGet</span> | <code>(key: string) =&gt; null &#124; string &#124; Promise&lt;null &#124; string&gt;</code> | | |
| <span className="parameter-name"><span className="light-grey">clientStorage.</span>customSet</span> | <code>(key: string, value: null &#124; string) =&gt; void &#124; Promise&lt;void&gt;</code> | | |
---

View File

@@ -1,20 +0,0 @@
---
title: postFetch()
sidebarTitle: postFetch()
---
## Parameters
---
**<span className="parameter-name">url</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">body</span>** <span className="optional-status">required</span> <code>any</code>
---
**<span className="parameter-name">token</span>** <span className="optional-status">optional</span> <code>null &#124; string</code>
---

View File

@@ -1,12 +0,0 @@
---
title: removeParameterFromWindow()
sidebarTitle: removeParameterFromWindow()
---
## Parameters
---
**<span className="parameter-name">name</span>** <span className="optional-status">required</span> <code>string</code>
---

View File

@@ -1,24 +0,0 @@
---
title: resetPasswordPromise()
sidebarTitle: resetPasswordPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;ResetPasswordContext, any, &#123; type: "REQUEST", email: string, options: ResetPasswordOptions &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, &#123; value: any, context: ResetPasswordContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "REQUEST", email: string, options: ResetPasswordOptions &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, BaseActionObject, ResetPasswordServices&gt;&gt;</code>
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> [`ResetPasswordOptions`](/reference/javascript/auth/types/reset-password-options)
| Property | Type | Required | Notes |
| :--------------------------------------------------------------------------------------------- | :------------------ | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">options.</span>redirectTo</span> | <code>string</code> | | Redirection path in the client application that will be used in the link in the verification email. For instance, if you want to redirect to `https://myapp.com/success`, the `redirectTo` value is `'/success'`. |
---

View File

@@ -1,25 +0,0 @@
---
title: rewriteRedirectTo()
sidebarTitle: rewriteRedirectTo()
---
Transform options that include a redirectTo property so the
redirect url is absolute, given a base clientUrl.
If no client url is given, any relative redirectUrl is removed while
the other options are sent as-is.
**`@returns`**
## Parameters
---
**<span className="parameter-name">clientUrl</span>** <span className="optional-status">optional</span> <code>string</code>
base client url
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> <code>T</code>
---

View File

@@ -1,24 +0,0 @@
---
title: sendVerificationEmailPromise()
sidebarTitle: sendVerificationEmailPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;SendVerificationEmailContext, any, &#123; type: "REQUEST", email: string, options: SendVerificationEmailOptions &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, &#123; value: any, context: SendVerificationEmailContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "REQUEST", email: string, options: SendVerificationEmailOptions &#125; &#124; &#123; type: "SUCCESS" &#125; &#124; &#123; type: "ERROR", error: null &#124; AuthErrorPayload &#125;, BaseActionObject, SendVerificationEmailServices&gt;&gt;</code>
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> [`SendVerificationEmailOptions`](/reference/javascript/auth/types/send-verification-email-options)
| Property | Type | Required | Notes |
| :--------------------------------------------------------------------------------------------- | :------------------ | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">options.</span>redirectTo</span> | <code>string</code> | | Redirection path in the client application that will be used in the link in the verification email. For instance, if you want to redirect to `https://myapp.com/success`, the `redirectTo` value is `'/success'`. |
---

View File

@@ -1,12 +0,0 @@
---
title: signInAnonymousPromise()
sidebarTitle: signInAnonymousPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---

View File

@@ -1,20 +0,0 @@
---
title: signInEmailPasswordPromise()
sidebarTitle: signInEmailPasswordPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">password</span>** <span className="optional-status">required</span> <code>string</code>
---

View File

@@ -1,29 +0,0 @@
---
title: signInEmailPasswordlessPromise()
sidebarTitle: signInEmailPasswordlessPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> [`PasswordlessOptions`](/reference/javascript/auth/types/passwordless-options)
| Property | Type | Required | Notes |
| :----------------------------------------------------------------------------------------------- | :----------------------------------------- | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">options.</span>redirectTo</span> | <code>string</code> | | Redirection path in the client application that will be used in the link in the verification email. For instance, if you want to redirect to `https://myapp.com/success`, the `redirectTo` value is `'/success'`. |
| <span className="parameter-name"><span className="light-grey">options.</span>metadata</span> | <code>Record&lt;string, unknown&gt;</code> | | Custom additional user information stored in the `metadata` column. Can be any JSON object. |
| <span className="parameter-name"><span className="light-grey">options.</span>displayName</span> | <code>string</code> | | Display name of the user. If not provided, it will use the display name given by the social provider (Oauth) used on registration, or the email address otherwise. |
| <span className="parameter-name"><span className="light-grey">options.</span>defaultRole</span> | <code>string</code> | | Default role of the user. Must be part of the default allowed roles defined in Hasura Auth. |
| <span className="parameter-name"><span className="light-grey">options.</span>allowedRoles</span> | <code>Array&lt;string&gt;</code> | | Allowed roles of the user. Must be a subset of the default allowed roles defined in Hasura Auth. |
| <span className="parameter-name"><span className="light-grey">options.</span>locale</span> | <code>string</code> | | Locale of the user, in two digits |
---

View File

@@ -1,16 +0,0 @@
---
title: signInEmailSecurityKeyPromise()
sidebarTitle: signInEmailSecurityKeyPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> <code>string</code>
---

View File

@@ -1,20 +0,0 @@
---
title: signInMfaTotpPromise()
sidebarTitle: signInMfaTotpPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">otp</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">ticket</span>** <span className="optional-status">optional</span> <code>string</code>
---

View File

@@ -1,16 +0,0 @@
---
title: signInPATPromise()
sidebarTitle: signInPATPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">pat</span>** <span className="optional-status">required</span> <code>string</code>
---

View File

@@ -1,20 +0,0 @@
---
title: signInSmsPasswordlessOtpPromise()
sidebarTitle: signInSmsPasswordlessOtpPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">phoneNumber</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">otp</span>** <span className="optional-status">required</span> <code>string</code>
---

View File

@@ -1,29 +0,0 @@
---
title: signInSmsPasswordlessPromise()
sidebarTitle: signInSmsPasswordlessPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">phoneNumber</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> [`PasswordlessOptions`](/reference/javascript/auth/types/passwordless-options)
| Property | Type | Required | Notes |
| :----------------------------------------------------------------------------------------------- | :----------------------------------------- | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">options.</span>locale</span> | <code>string</code> | | Locale of the user, in two digits |
| <span className="parameter-name"><span className="light-grey">options.</span>allowedRoles</span> | <code>Array&lt;string&gt;</code> | | Allowed roles of the user. Must be a subset of the default allowed roles defined in Hasura Auth. |
| <span className="parameter-name"><span className="light-grey">options.</span>defaultRole</span> | <code>string</code> | | Default role of the user. Must be part of the default allowed roles defined in Hasura Auth. |
| <span className="parameter-name"><span className="light-grey">options.</span>displayName</span> | <code>string</code> | | Display name of the user. If not provided, it will use the display name given by the social provider (Oauth) used on registration, or the email address otherwise. |
| <span className="parameter-name"><span className="light-grey">options.</span>metadata</span> | <code>Record&lt;string, unknown&gt;</code> | | Custom additional user information stored in the `metadata` column. Can be any JSON object. |
| <span className="parameter-name"><span className="light-grey">options.</span>redirectTo</span> | <code>string</code> | | Redirection path in the client application that will be used in the link in the verification email. For instance, if you want to redirect to `https://myapp.com/success`, the `redirectTo` value is `'/success'`. |
---

View File

@@ -1,16 +0,0 @@
---
title: signOutPromise()
sidebarTitle: signOutPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">all</span>** <span className="optional-status">optional</span> <code>boolean</code>
---

View File

@@ -1,33 +0,0 @@
---
title: signUpEmailPasswordPromise()
sidebarTitle: signUpEmailPasswordPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">password</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> [`SignUpOptions`](/reference/javascript/auth/types/sign-up-options)
| Property | Type | Required | Notes |
| :----------------------------------------------------------------------------------------------- | :----------------------------------------- | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">options.</span>redirectTo</span> | <code>string</code> | | Redirection path in the client application that will be used in the link in the verification email. For instance, if you want to redirect to `https://myapp.com/success`, the `redirectTo` value is `'/success'`. |
| <span className="parameter-name"><span className="light-grey">options.</span>metadata</span> | <code>Record&lt;string, unknown&gt;</code> | | Custom additional user information stored in the `metadata` column. Can be any JSON object. |
| <span className="parameter-name"><span className="light-grey">options.</span>displayName</span> | <code>string</code> | | Display name of the user. If not provided, it will use the display name given by the social provider (Oauth) used on registration, or the email address otherwise. |
| <span className="parameter-name"><span className="light-grey">options.</span>defaultRole</span> | <code>string</code> | | Default role of the user. Must be part of the default allowed roles defined in Hasura Auth. |
| <span className="parameter-name"><span className="light-grey">options.</span>allowedRoles</span> | <code>Array&lt;string&gt;</code> | | Allowed roles of the user. Must be a subset of the default allowed roles defined in Hasura Auth. |
| <span className="parameter-name"><span className="light-grey">options.</span>locale</span> | <code>string</code> | | Locale of the user, in two digits |
---

View File

@@ -1,30 +0,0 @@
---
title: signUpEmailSecurityKeyPromise()
sidebarTitle: signUpEmailSecurityKeyPromise()
---
## Parameters
---
**<span className="parameter-name">interpreter</span>** <span className="optional-status">required</span> <code>Interpreter&lt;AuthContext, any, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, &#123; value: any, context: AuthContext &#125;, ResolveTypegenMeta&lt;Typegen0, &#123; type: "SESSION_UPDATE", data: &#123; session: NhostSession &#125; &#125; &#124; &#123; type: "TRY_TOKEN", token: string &#125; &#124; &#123; type: "SIGNIN_ANONYMOUS" &#125; &#124; &#123; type: "SIGNIN_PAT", pat: string &#125; &#124; &#123; type: "SIGNIN_SECURITY_KEY_EMAIL", email: string &#125; &#124; &#123; type: "SIGNIN_PASSWORD", email: string, password: string &#125; &#124; &#123; type: "PASSWORDLESS_EMAIL", email: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS", phoneNumber: string, options: PasswordlessOptions &#125; &#124; &#123; type: "PASSWORDLESS_SMS_OTP", phoneNumber: string, otp: string &#125; &#124; &#123; type: "SIGNUP_EMAIL_PASSWORD", email: string, password: string, options: SignUpOptions &#125; &#124; &#123; type: "SIGNUP_SECURITY_KEY", email: string, options: SignUpSecurityKeyOptions &#125; &#124; &#123; type: "SIGNOUT", all: boolean &#125; &#124; &#123; type: "SIGNIN_MFA_TOTP", ticket: string, otp: string &#125; &#124; &#123; type: "SIGNED_IN" &#125; &#124; &#123; type: "SIGNED_OUT" &#125; &#124; &#123; type: "TOKEN_CHANGED" &#125; &#124; &#123; type: "AWAIT_EMAIL_VERIFICATION" &#125;, BaseActionObject, AuthServices&gt;&gt;</code>
---
**<span className="parameter-name">email</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">options</span>** <span className="optional-status">optional</span> [`SignUpSecurityKeyOptions`](/reference/javascript/auth/types/sign-up-security-key-options)
| Property | Type | Required | Notes |
| :----------------------------------------------------------------------------------------------- | :----------------------------------------- | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">options.</span>nickname</span> | <code>string</code> | | Optional nickname for the security key |
| <span className="parameter-name"><span className="light-grey">options.</span>redirectTo</span> | <code>string</code> | | Redirection path in the client application that will be used in the link in the verification email. For instance, if you want to redirect to `https://myapp.com/success`, the `redirectTo` value is `'/success'`. |
| <span className="parameter-name"><span className="light-grey">options.</span>metadata</span> | <code>Record&lt;string, unknown&gt;</code> | | Custom additional user information stored in the `metadata` column. Can be any JSON object. |
| <span className="parameter-name"><span className="light-grey">options.</span>displayName</span> | <code>string</code> | | Display name of the user. If not provided, it will use the display name given by the social provider (Oauth) used on registration, or the email address otherwise. |
| <span className="parameter-name"><span className="light-grey">options.</span>defaultRole</span> | <code>string</code> | | Default role of the user. Must be part of the default allowed roles defined in Hasura Auth. |
| <span className="parameter-name"><span className="light-grey">options.</span>allowedRoles</span> | <code>Array&lt;string&gt;</code> | | Allowed roles of the user. Must be a subset of the default allowed roles defined in Hasura Auth. |
| <span className="parameter-name"><span className="light-grey">options.</span>locale</span> | <code>string</code> | | Locale of the user, in two digits |
---

View File

@@ -1,6 +1,5 @@
---
title: AuthCookieClient
sidebarTitle: AuthCookieClient
description: No description provided.
---

View File

@@ -0,0 +1,23 @@
---
title: connectProvider()
sidebarTitle: connectProvider()
---
Use `nhost.auth.connectProvider` to connect a social authentication provider to an existing user account
```ts
nhost.auth.connectProvider({
provider: 'github
options: {
redirectTo: window.location.href
}
})
```
## Parameters
---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`SignInWithProviderParams`](/reference/javascript/auth/types/sign-in-with-provider-params)
---

View File

@@ -7,7 +7,7 @@ Use `nhost.auth.getHasuraClaim` to get the value of a specific Hasura claim of t
```ts
// if `x-hasura-company-id` exists as a custom claim
const companyId = nhost.auth.getHsauraClaim('company-id')
const companyId = nhost.auth.getHasuraClaim('company-id')
```
## Parameters

View File

@@ -3,8 +3,20 @@ title: getSession()
sidebarTitle: getSession()
---
Use `nhost.auth.getSession()` to get the session of the user.
## Parameters
```ts
const session = nhost.auth.getSession()
```
---
**<span className="parameter-name">context</span>** <span className="optional-status">optional</span> [`AuthContext`](/reference/javascript/auth/types/auth-context)
| Property | Type | Required | Notes |
| :------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------- | :------: | :------------------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">context.</span>errors</span> | <code>Partial&lt;Record&lt;StateErrorTypes, AuthErrorPayload&gt;&gt;</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>importTokenAttempts</span> | <code>number</code> | ✔️ | Number of times the user tried to get an access token from a refresh token but got a network error |
| <span className="parameter-name"><span className="light-grey">context.</span>refreshToken</span> | <code>&#123; value: string &#124; null, isPAT: boolean &#125;</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>refreshTimer</span> | <code>&#123; startedAt: Date &#124; null, attempts: number, lastAttempt: Date &#124; null &#125;</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>accessToken</span> | <code>&#123; value: string &#124; null, expiresAt: Date &#124; null, expiresInSeconds: number &#124; null &#125;</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>mfa</span> | <code>&#123; ticket: string &#125; &#124; null</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">context.</span>user</span> | <code>[`User`](/reference/javascript/auth/types/user) &#124; null</code> | ✔️ | |
---

View File

@@ -1,6 +1,5 @@
---
title: HasuraAuthClient
sidebarTitle: Auth
description: No description provided.
---

View File

@@ -9,10 +9,10 @@ Note: The Nhost client automatically refreshes the session when the user is auth
```ts
// Refresh the session with the the current internal refresh token.
nhost.auth.refreshSession()
nhost.auth.refreshToken()
// Refresh the session with an external refresh token.
nhost.auth.refreshSession(refreshToken)
nhost.auth.refreshToken(refreshToken)
```
## Parameters

View File

@@ -46,3 +46,7 @@ Redirection path in the client application that will be used in the link in the
For instance, if you want to redirect to `https://myapp.com/success`, the `redirectTo` value is `'/success'`.
---
**<span className="parameter-name">connect</span>** <span className="optional-status">optional</span> <code>boolean</code>
---

View File

@@ -36,6 +36,7 @@ https://hasura.io/docs/1.0/graphql/core/auth/authentication/jwt.html#the-spec
| Property | Type | Required | Notes |
| :---------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :------: | :---- |
| <span className="parameter-name"><span className="light-grey">https://hasura.io/jwt/claims.</span>x-hasura-auth-elevated</span> | <code>string</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">https://hasura.io/jwt/claims.</span>x-hasura-user-is-anonymous</span> | <code>string</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">https://hasura.io/jwt/claims.</span>x-hasura-user-id</span> | <code>string</code> | ✔️ | |
| <span className="parameter-name"><span className="light-grey">https://hasura.io/jwt/claims.</span>x-hasura-default-role</span> | <code>string</code> | ✔️ | |

View File

@@ -10,6 +10,10 @@ description: No description provided.
---
**<span className="parameter-name">x-hasura-auth-elevated</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">x-hasura-user-is-anonymous</span>** <span className="optional-status">required</span> <code>string</code>
---

View File

@@ -47,6 +47,10 @@ For instance, if you want to redirect to `https://myapp.com/success`, the `redir
---
**<span className="parameter-name">connect</span>** <span className="optional-status">optional</span> <code>boolean</code>
---
**<span className="parameter-name">connection</span>** <span className="optional-status">optional</span> <code>string</code>
---

View File

@@ -47,6 +47,10 @@ For instance, if you want to redirect to `https://myapp.com/success`, the `redir
---
**<span className="parameter-name">connect</span>** <span className="optional-status">optional</span> <code>boolean</code>
---
**<span className="parameter-name">connection</span>** <span className="optional-status">optional</span> <code>string</code>
---

View File

@@ -23,6 +23,12 @@ const providerLink = useProviderLink()
const providerLink = useProviderLink()
```
Pass in the `connect` option to connect the user's account to the OAuth provider when different emails are used.
```js
const providerLink = useProviderLink({ connect: true })
```
```jsx
import { useProviderLink } from '@nhost/react'

View File

@@ -23,6 +23,12 @@ const providerLink = useProviderLink()
const providerLink = useProviderLink()
```
Pass in the `connect` option to connect the user's account to the OAuth provider when different emails are used.
```js
const providerLink = useProviderLink({ connect: true })
```
```jsx
import { useProviderLink } from '@nhost/vue'

View File

@@ -1,5 +1,11 @@
# @nhost-examples/cli
## 0.3.1
### Patch Changes
- @nhost/nhost-js@3.0.11
## 0.3.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/cli",
"version": "0.3.0",
"version": "0.3.1",
"main": "src/index.mjs",
"private": true,
"scripts": {

View File

@@ -1,5 +1,12 @@
# @nhost-examples/codegen-react-apollo
## 0.4.1
### Patch Changes
- @nhost/react@3.4.1
- @nhost/react-apollo@11.0.1
## 0.4.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/codegen-react-apollo",
"version": "0.4.0",
"version": "0.4.1",
"private": true,
"scripts": {
"codegen": "graphql-codegen",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/codegen-react-query
## 0.4.1
### Patch Changes
- @nhost/react@3.4.1
## 0.4.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/codegen-react-query",
"version": "0.4.0",
"version": "0.4.1",
"private": true,
"scripts": {
"codegen": "graphql-codegen",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/react-urql
## 0.3.1
### Patch Changes
- @nhost/react@3.4.1
- @nhost/react-urql@8.0.1
## 0.3.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@nhost-examples/codegen-react-urql",
"private": true,
"version": "0.3.0",
"version": "0.3.1",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/multi-tenant-one-to-many
## 2.2.1
### Patch Changes
- @nhost/nhost-js@3.0.11
## 2.2.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@nhost-examples/multi-tenant-one-to-many",
"private": true,
"version": "2.2.0",
"version": "2.2.1",
"description": "",
"main": "index.js",
"scripts": {},

View File

@@ -1,5 +1,13 @@
# @nhost-examples/nextjs
## 0.3.1
### Patch Changes
- @nhost/react@3.4.1
- @nhost/react-apollo@11.0.1
- @nhost/nextjs@2.1.10
## 0.3.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/nextjs",
"version": "0.3.0",
"version": "0.3.1",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/node-storage
## 0.2.1
### Patch Changes
- @nhost/nhost-js@3.0.11
## 0.2.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/node-storage",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"description": "This is an example of how to use the Storage with Node.js",
"main": "src/index.mjs",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/nextjs-server-components
## 0.4.1
### Patch Changes
- @nhost/nhost-js@3.0.11
## 0.4.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/nextjs-server-components",
"version": "0.4.0",
"version": "0.4.1",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/react-apollo
## 0.8.1
### Patch Changes
- @nhost/react@3.4.1
- @nhost/react-apollo@11.0.1
## 0.8.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/react-apollo",
"version": "0.8.0",
"version": "0.8.1",
"private": true,
"dependencies": {
"@apollo/client": "^3.9.9",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/react-gqty
## 1.2.1
### Patch Changes
- @nhost/react@3.4.1
## 1.2.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@nhost-examples/react-gqty",
"private": true,
"version": "1.2.0",
"version": "1.2.1",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# @nhost-examples/vue-apollo
## 0.6.1
### Patch Changes
- @nhost/nhost-js@3.0.11
- @nhost/apollo@6.2.1
- @nhost/vue@2.5.1
## 0.6.0
### Minor Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@nhost-examples/vue-apollo",
"private": true,
"version": "0.6.0",
"version": "0.6.1",
"scripts": {
"dev": "vite",
"build": "vite build",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/vue-quickstart
## 0.2.1
### Patch Changes
- @nhost/apollo@6.2.1
- @nhost/vue@2.5.1
## 0.2.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost-examples/vue-quickstart",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"scripts": {
"build": "vite build",

View File

@@ -1,5 +1,11 @@
# @nhost/apollo
## 6.2.1
### Patch Changes
- @nhost/nhost-js@3.0.11
## 6.2.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/apollo",
"version": "6.2.0",
"version": "6.2.1",
"description": "Nhost Apollo Client library",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,12 @@
# @nhost/react-apollo
## 11.0.1
### Patch Changes
- @nhost/apollo@6.2.1
- @nhost/react@3.4.1
## 11.0.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/react-apollo",
"version": "11.0.0",
"version": "11.0.1",
"description": "Nhost React Apollo client",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/react-urql
## 8.0.1
### Patch Changes
- @nhost/react@3.4.1
## 8.0.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/react-urql",
"version": "8.0.0",
"version": "8.0.1",
"description": "Nhost React URQL client",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/hasura-auth-js
## 2.4.1
### Patch Changes
- bcd889b: fix: change expiresAt format to RFC3339 in createPATPromise
## 2.4.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/hasura-auth-js",
"version": "2.4.0",
"version": "2.4.1",
"description": "Hasura-auth client",
"license": "MIT",
"keywords": [

View File

@@ -39,7 +39,7 @@ export const createPATPromise = async (
try {
const { data } = await postFetch<PersonalAccessTokenCreationResponse>(
`${backendUrl}/pat`,
{ expiresAt: expiresAt.toUTCString(), metadata },
{ expiresAt: expiresAt.toISOString(), metadata },
interpreter?.getSnapshot().context.accessToken.value
)

View File

@@ -1,5 +1,11 @@
# @nhost/nextjs
## 2.1.10
### Patch Changes
- @nhost/react@3.4.1
## 2.1.9
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/nextjs",
"version": "2.1.9",
"version": "2.1.10",
"description": "Nhost NextJS library",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,12 @@
# @nhost/nhost-js
## 3.0.11
### Patch Changes
- Updated dependencies [bcd889b]
- @nhost/hasura-auth-js@2.4.1
## 3.0.10
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/nhost-js",
"version": "3.0.10",
"version": "3.0.11",
"description": "Nhost JavaScript SDK",
"license": "MIT",
"keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/react
## 3.4.1
### Patch Changes
- @nhost/nhost-js@3.0.11
## 3.4.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/react",
"version": "3.4.0",
"version": "3.4.1",
"description": "Nhost React library",
"license": "MIT",
"keywords": [

View File

@@ -17,6 +17,14 @@ import { useAccessToken } from './useAccessToken'
* ```
*
* @example
*
* Pass in the `connect` option to connect the user's account to the OAuth provider when different emails are used.
*
* ```js
* const providerLink = useProviderLink({ connect: true });
* ```
*
* @example
* ```jsx
* import { useProviderLink } from '@nhost/react';
*

Some files were not shown because too many files have changed in this diff Show More