Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
To create the GitHub Client ID and Client Secret, go to https://github.com/settings/profile, Developer Settings on the left-hand nav-bar, OAuth Apps, New OAuth App. Fill in a name and your localhost with port for the homepage URL. Copy the homepage URL and add /api/auth/callback/github. This will allow the /api/auth/[...nextauth].ts file to catch this callback URL and use it to create a user in the database. The form should look something like this:
Follow the instructions here to install the Stripe CLI.
Stripe is one of the most popular payment systems existing today. It essentially allows you to build payment forms into your apps, websites, and servers, and it handles all of the complex logic behind communicating with credit card companies and banks to actually get you your payment. It supports a ton of use cases, including paid subscriptions, which is what we'll use it for. Read more about it at https://stripe.com/.
Next-Auth is a great way of easily adding user registration and authentication to your Next.js projects. Its docs provide you everything you need to get started with a huge variety of authentication providers and databases. You can read more about it at https://next-auth.js.org/.
Related posts
- Streamlining Role-Based Access Control in Next.js with Descope and Auth.js: A Step-by-Step Guide
- Nextauth.js: Use <SessionProvider /> in Next.js "app" directory
- NextAuth with AWS Cognito Email & Google Sign in
- Handling OAuth 2 Sign-In and Sign-Up Distinctly with NextAuth.js
- Setting up Next.js with NextAuth, Prisma and "Credentials" Auth Provider