From 28501c6af4270937f67c460c1358ac4d3e489b43 Mon Sep 17 00:00:00 2001 From: Lee Robinson Date: Wed, 26 May 2021 12:06:47 -0700 Subject: [PATCH] Update Authentication docs to be an examples list. (#25497) Replaces https://github.com/vercel/next.js/pull/25485. --- docs/authentication.md | 62 +++--------------------------------------- 1 file changed, 4 insertions(+), 58 deletions(-) diff --git a/docs/authentication.md b/docs/authentication.md index 00e15c1e43797..8bb315622d329 100644 --- a/docs/authentication.md +++ b/docs/authentication.md @@ -127,77 +127,23 @@ Both of these libraries support either authentication pattern. If you're interes - [with-passport](https://github.com/vercel/next.js/tree/canary/examples/with-passport) - [with-passport-and-next-connect](https://github.com/vercel/next.js/tree/canary/examples/with-passport-and-next-connect) -### Firebase +### Other Providers -
- Examples - -
- -When using Firebase Authentication, we recommend using the static generation pattern. - -It is possible to use the Firebase Client SDK to generate an ID token and forward it directly to Firebase's REST API on the server to log-in. However, requests to Firebase might take some time to resolve, depending on your user's location. - -You can either use [FirebaseUI](https://github.com/firebase/firebaseui-web-react) for a drop-in UI, or create your own with a [custom React hook](https://usehooks.com/useAuth/). - -### Magic (Passwordless) +To see examples with other authentication providers, check out the [examples folder](https://github.com/vercel/next.js/tree/canary/examples).
Examples -
- -[Magic](https://magic.link/), which uses [passwordless login](https://magic.link/), supports the static generation pattern. Similar to Firebase, a [unique identifier](https://w3c-ccg.github.io/did-primer/) has to be created on the client-side and then forwarded as a header to log-in. Then, Magic's Node SDK can be used to exchange the indentifier for a user's information. - -### Auth0 - -
- Examples - -
- -[Auth0](https://auth0.com/) can support both authentication patterns. You can also utilize [API routes](/docs/api-routes/introduction.md) for logging in/out and retrieving user information. After logging in using the [Auth0 SDK](https://github.com/auth0/nextjs-auth0), you can utilize static generation or `getServerSideProps` for server-side rendering. - -### Supabase - -
- Examples - -
- -[Supabase](https://supabase.io/) is an open source Firebase alternative that supports many of its features, including authentication. It allows for row level security using JWT tokens and supports third party logins. Either authentication pattern is supported. - -### Userbase - -
- Examples - -
- -[Userbase](https://userbase.com/) supports the static generation pattern for authentication. It's open source and allows for a high level of security with end-to-end encryption. You can learn more about it in their [official site](https://userbase.com/). - -### SuperTokens - -
- Examples -
-[SuperTokens](https://supertokens.io) is a highly customizable, open-source solution split into modules (so you only use what you need). -SuperTokens currently supports credentials login, email verification, password reset flows, third-party logins, and cookie based sessions with rotating refresh tokens. - ## Related For more information on what to do next, we recommend the following sections: