From d22e9c4e6f2c80afb9b87eac4f31c7caa2b11038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thor=20=E9=9B=B7=E7=A5=9E=20Schaeff?= <5748289+thorwebdev@users.noreply.github.com> Date: Tue, 14 Nov 2023 12:46:30 +0800 Subject: [PATCH] docs: passwordless auth docs improvements. (#18872) * docs: passwordless auth docs improvements. * fix: typo. * Update apps/docs/pages/guides/auth/passwordless-login/auth-email-otp.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/docs/pages/guides/auth/passwordless-login/auth-email-otp.mdx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> --------- Co-authored-by: Tyler <18113850+dshukertjr@users.noreply.github.com> Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> --- .../NavigationMenu.constants.ts | 10 +- .../pages/guides/auth/passwordless-login.mdx | 57 ++++++++ .../passwordless-login/auth-email-otp.mdx | 123 ++++++++++++++++++ .../auth-magic-link.mdx | 0 apps/www/lib/redirects.js | 5 + 5 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 apps/docs/pages/guides/auth/passwordless-login.mdx create mode 100644 apps/docs/pages/guides/auth/passwordless-login/auth-email-otp.mdx rename apps/docs/pages/guides/auth/{ => passwordless-login}/auth-magic-link.mdx (100%) diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index e582635c20c..7feae10868d 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -497,7 +497,15 @@ export const auth = { url: undefined, items: [ { name: 'Email Login', url: '/guides/auth/auth-email' }, - { name: 'Magic Link Login', url: '/guides/auth/auth-magic-link' }, + { + name: 'Passwordless Login', + url: '/guides/auth/passwordless-login', + items: [ + { name: 'Email Magic Link', url: '/guides/auth/passwordless-login/auth-magic-link' }, + { name: 'Email OTP', url: '/guides/auth/passwordless-login/auth-email-otp' }, + { name: 'Phone OTP', url: '/guides/auth/phone-login' }, + ], + }, { name: 'Phone Login', url: '/guides/auth/phone-login', diff --git a/apps/docs/pages/guides/auth/passwordless-login.mdx b/apps/docs/pages/guides/auth/passwordless-login.mdx new file mode 100644 index 00000000000..cd8a76cd7f6 --- /dev/null +++ b/apps/docs/pages/guides/auth/passwordless-login.mdx @@ -0,0 +1,57 @@ +import Layout from '~/layouts/DefaultGuideLayout' +import { IconPanel, GlassPanel, IconMail } from 'ui' +import Link from 'next/link' +import { PhoneLoginsItems } from '~/components/Navigation/NavigationMenu/NavigationMenu.constants' + +export const meta = { + title: 'Passwordless Login', + description: 'Sign in your users without passwords via magic link email, or one-time passwords sent via email, SMS, or WhatsApp.', +} + +Supabase supports various forms of passwordless authentication: + +- [Email Magic Link](/docs/guides/auth/passwordless-login/auth-magic-link) +- [Email one-time password (OTP)](/docs/guides/auth/passwordless-login/auth-email-otp) +- [SMS & WhatsApp one-time password (OTP)](/docs/guides/auth/phone-login) + +## Benefits + +There are several reasons why you might want to add passwordless login to your applications: + +- **Improved user experience**: Eliminating the need for users to remember and enter complex passwords can make it easier and more convenient for users to log in to your application. This can improve the overall user experience and make it more enjoyable for users to interact with your application. + +- **Increased security**: Passwordless login can improve the security of your application by reducing the risk of password-related security breaches, such as password reuse and weak passwords. By using alternative forms of authentication, such as one-time codes or biometric factors, you can make it more difficult for unauthorized users to access your application. + +- **Reduced support burden**: Passwordless login can also help reduce the support burden for your team by eliminating the need to handle password recovery flows or deal with other password-related issues. This can free up your team to focus on other important tasks and improve the efficiency of your operation. + +## Passwordless login options with Supabase Auth + +### Email based + +- [Email Magic Link](/docs/guides/auth/passwordless-login/auth-magic-link) +- [Email one-time password (OTP)](/docs/guides/auth/passwordless-login/auth-email-otp) + +## Phone based + +Supabase supports [Phone Login](/docs/guides/auth/phone-login) (SMS & WhatsApp) with several communications platforms. Follow the guides below to set up a provider with Supabase Auth. + +
Please enter this code: {{ .Token }}
+``` + +## Signing in a user with email OTP + +