Skip to content

Commit

Permalink
Merge upstream changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sync Fork committed Feb 17, 2024
1 parent 0f77c94 commit 622f87a
Show file tree
Hide file tree
Showing 38 changed files with 430 additions and 41 deletions.
6 changes: 6 additions & 0 deletions dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @nhost/dashboard

## 1.7.0

### Minor Changes

- 0d8d0eb: Update docs and dashboard references

## 1.6.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nhost/dashboard",
"version": "1.6.9",
"version": "1.7.0",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default function AllowedEmailDomainsSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication#allowed-emails-and-domains"
docsLink="https://docs.nhost.io/guides/auth/overview#allowed-emails-and-domains"
switchId="enabled"
showSwitch
className={twMerge(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default function AllowedRedirectURLsSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication#allowed-redirect-urls"
docsLink="https://docs.nhost.io/guides/auth/overview#allowed-redirect-urls"
className="grid grid-flow-row px-4 lg:grid-cols-5"
>
<Input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function AppleProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication/sign-in-with-apple"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-apple"
docsTitle="how to sign in users with Apple"
icon={
theme.palette.mode === 'dark'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default function BlockedEmailSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication#blocked-emails-and-domains"
docsLink="https://docs.nhost.io/guides/auth/overview#allowed-emails-and-domains"
switchId="enabled"
showSwitch
className={twMerge(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default function ClientURLSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication#client-url"
docsLink="https://docs.nhost.io/guides/auth/overview#client-url"
className="grid grid-flow-row lg:grid-cols-5"
>
<Input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function DisableNewUsersSettings() {
<SettingsContainer
title="Disable New Users"
description="If set, newly registered users are disabled and won't be able to sign in."
docsLink="https://docs.nhost.io/authentication#disable-new-users"
docsLink="https://docs.nhost.io/guides/auth/overview#disable-new-users"
switchId="disabled"
showSwitch
slotProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function DiscordProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/platform/authentication/sign-in-with-discord"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-discord"
docsTitle="how to sign in users with Discord"
icon="/assets/brands/discord.svg"
switchId="enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default function EmailAndPasswordSettings() {
<SettingsContainer
title="Email and Password"
description="Allow users to sign in with email and password."
docsLink="https://docs.nhost.io/authentication/sign-in-with-email-and-password"
docsLink="https://docs.nhost.io/guides/auth/sign-in-email-password"
docsTitle="how to sign in users with email and password"
className="grid grid-flow-row"
showSwitch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function FacebookProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/platform/authentication/sign-in-with-facebook"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-facebook"
docsTitle="how to sign in users with Facebook"
icon="/assets/brands/facebook.svg"
switchId="enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function GitHubProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/platform/authentication/sign-in-with-github"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-github"
docsTitle="how to sign in users with GitHub"
icon={
theme.palette.mode === 'dark'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function GoogleProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/platform/authentication/sign-in-with-google"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-google"
docsTitle="how to sign in users with Google"
icon="/assets/brands/google.svg"
switchId="enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function GravatarSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication#gravatar"
docsLink="https://docs.nhost.io/guides/auth/overview#gravatar"
switchId="enabled"
showSwitch
className={twMerge(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function LinkedInProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/platform/authentication/sign-in-with-linkedin"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-linkedin"
docsTitle="how to sign in users with LinkedIn"
icon="/assets/brands/linkedin.svg"
switchId="enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function MFASettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication#multi-factor-authentication"
docsLink="https://docs.nhost.io/guides/auth/overview#multi-factor-authentication"
switchId="enabled"
showSwitch
className={twMerge(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function MagicLinkSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication/sign-in-with-magic-link"
docsLink="https://docs.nhost.io/guides/auth/sign-in-magic-link"
docsTitle="how to sign in users with Magic Link"
switchId="enabled"
showSwitch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default function SMSSettings() {
}}
switchId="enabled"
showSwitch
docsLink="https://docs.nhost.io/authentication/sign-in-with-phone-number-sms"
docsLink="https://docs.nhost.io/guides/auth/sign-in-phone-number"
docsTitle="how to sign in users with a phone number (SMS)"
className={twMerge(
'grid grid-flow-col grid-cols-2 grid-rows-4 gap-x-3 gap-y-4 px-4 py-2',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function SpotifyProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/platform/authentication/sign-in-with-spotify"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-spotify"
docsTitle="how to sign in users with Spotify"
icon="/assets/brands/spotify.svg"
switchId="enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function TwitchProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/platform/authentication/sign-in-with-twitch"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-twitch"
docsTitle="how to sign in users with Twitch"
icon={
theme.palette.mode === 'dark'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function WebAuthnSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication/sign-in-with-security-keys"
docsLink="https://docs.nhost.io/guides/auth/sign-in-webauthn"
docsTitle="how to sign in users with security keys"
switchId="enabled"
showSwitch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default function WorkOsProviderSettings() {
loading: formState.isSubmitting,
},
}}
docsLink="https://docs.nhost.io/authentication/sign-in-with-workos"
docsLink="https://docs.nhost.io/guides/auth/social/sign-in-workos"
docsTitle="how to sign in users with WorkOS"
icon="/assets/brands/workos.svg"
switchId="enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function PermissionVariableSettings() {
<SettingsContainer
title="Permission Variables"
description="Permission variables are used to define permission rules in the GraphQL API."
docsLink="https://docs.nhost.io/graphql/permissions"
docsLink="https://docs.nhost.io/guides/api/permissions#permission-variables"
rootClassName="gap-0"
className="my-2 px-0"
slotProps={{ submitButton: { className: 'hidden' } }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function ResourcesFormFooter() {
<Text>
Learn more about{' '}
<Link
href="https://docs.nhost.io/platform/compute"
href="https://docs.nhost.io/platform/compute-resources"
target="_blank"
rel="noopener noreferrer"
underline="hover"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default function RoleSettings() {
<SettingsContainer
title="Default Allowed Roles"
description="Default Allowed Roles are roles users get automatically when they sign up."
docsLink="https://docs.nhost.io/authentication/users#allowed-roles"
docsLink="https://docs.nhost.io/guides/auth/users#allowed-roles"
rootClassName="gap-0"
className={twMerge(
'my-2 px-0',
Expand Down
11 changes: 11 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @nhost/docs

## 2.5.0

### Minor Changes

- 0d8d0eb: Update docs and dashboard references

### Patch Changes

- 41617b9: feat: added elevated permissions docs
- 7db095f: chore: added a note about disk performance and CDN information

## 2.4.0

### Minor Changes
Expand Down
111 changes: 111 additions & 0 deletions docs/guides/auth/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: Overview
description: Learn about Nhost Auth
icon: hand-wave
---

Nhost Auth is a ready-to-use authentication service seamlessly integrated with the [GraphQL API](/product/graphql) and its [Permission System](/guides/api/permissions) from Hasura. This allows you to easily add user authentication to your application without having to build and maintain your own authentication system.

## Supported Methods

<CardGroup cols={4}>
<Card title="Email and Password" icon="square-1" href="/guides/auth/sign-in-email-password">
</Card>
<Card title="Magic Link" icon="square-2" href="/guides/auth/sign-in-magic-link">
</Card>
<Card title="Phone Number (SMS)" icon="square-3" href="/guides/auth/sign-in-phone-number">
</Card>
<Card title="Security Keys (WebAuthn)" icon="square-4" href="/guides/auth/sign-in-webauthn">
</Card>
<Card title="Elevated Permissions" icon="square-5" href="/guides/auth/elevated-permissions">
</Card>
</CardGroup>

### OAuth Providers

<CardGroup cols={4}>
<Card title="Apple" icon="square-1" href="/guides/auth/social/sign-in-apple">
</Card>
<Card title="Discord" icon="square-2" href="/guides/auth/social/sign-in-discord">
</Card>
<Card title="Facebook" icon="square-3" href="/guides/auth/social/sign-in-facebook">
</Card>
<Card title="GitHub" icon="square-4" href="/guides/auth/social/sign-in-github">
</Card>
<Card title="Google" icon="square-5" href="/guides/auth/social/sign-in-google">
</Card>
<Card title="Linkedin" icon="square-6" href="/guides/auth/social/sign-in-linkedin">
</Card>
<Card title="Spotify" icon="square-7" href="/guides/auth/social/sign-in-spotify">
</Card>
<Card title="Twitch" icon="square-8" href="/guides/auth/social/sign-in-twitch">
</Card>
<Card title="WorkOS" icon="square-9" href="/guides/auth/social/sign-in-workos">
</Card>
</CardGroup>

## Client URL

Client URL is the URL of your frontend application. The Client URL is used to redirect the user in certain auth workflows like signing in or resetting a password.

## Allowed Redirect URLs

Allowed Redirect URLs are the URLs of your frontend application that users are allowed to be redirected to on specific auth workflows. This is useful if you have multiple applications using the same Nhost backend or if you want to redirect users to a specific URL after certain authentication workflows.

As an example, for a staging project, you can set the Client URL to `https://staging.example.com` and Allowed Redirect URLs to `https://*.vercel.app`. This way, the user can be redirected to any Vercel deployment of your frontend application.

## Allowed Emails and Domains

Allowed Emails and Domains are used to restrict what email adresses and domains are valid when signing up and signing in.

If both allowed emails and allowed domains are set a user can only sign up if their email address matches one of the allowed emails or one of the allowed domains.

## Blocked Emails and Domains

Blocked Emails and Domains are used to block specific email addresses and domains from signing up and signing in.

Note that even if a user's email address matches any allowed email or domain, they will still be blocked if their email address matches any blocked email or domain.

## Multi-factor Authentication

By enabling Multi-Factor Authentication (MFA), you can allow users to verify their identity using a second factor during the sign-in process. We currently support Authenticator Apps (TOTP) for MFA.

A user can enable MFA for their account by scanning a QR code with their Authenticator App. After that, they will be prompted to enter a code generated by their Authenticator App during the sign-in process.

## Gravatar

If Gravatar is enabled, Nhost Auth will use the user's email address to fetch their Gravatar profile picture. If the user doesn't have a Gravatar profile picture, a default image will be used.

There are two options for Gravatars.

<Steps>
<Step title="Default Image">

If the user doesn't have a Gravatar profile picture, a default image will be used. You can choose between the following options:

- `404`: Do not load any image if none is associated with the email hash, instead return an HTTP 404 (File Not Found) response.
- `mp`: (mystery-person) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash).
- `identicon`: a geometric pattern based on an email hash.
- `monsterid`: a generated 'monster' with different colors, faces, etc.
- `wavatar`: generated faces with differing features and backgrounds.
- `retro`: awesome generated, 8-bit arcade-style pixelated faces.
- `robohash`: a generated robot with different colors, faces, etc.
- `blank`: a transparent PNG image.

</Step>

<Step title="Rating">

Gravatar images are rated by default. You can choose between the following options:

- `g`: suitable for display on all websites with any audience type.
- `pg`: may contain rude gestures, provocatively dressed individuals, lesser swear words or mild violence.
- `r`: may contain such things as harsh profanity, intense violence, nudity, or hard drug use.
- `x`: may contain hardcore sexual imagery or extremely disturbing violence.

</Step>
</Steps>

## Disable New Users

If set, newly registered users are disabled and won't be able to sign in. This is useful if you want to manually approve new users before they can sign in.
Loading

0 comments on commit 622f87a

Please sign in to comment.