Next Auth
Configure next-auth with a single click
Usage
Setup Environment
- Start by creating a google cloud project here.
- In the search bar, search credentials and select the option related to APIs and services.
- Press Create Credentials and create an OAuth client ID.
- Set the Authorized JavaScript origins and Authorized redirect URIs as follows:
- Copy the Client ID and Client Secret into the
.env.local
file at the root of your Next.js project as follows:
Github
- Visit this link to create an OAuth app.
- Rotate between the following Homepage URLs and Authorization callback URLs:
Make sure to use localhost for testing, and switch to your production URL when deploying your code.
- Copy your Client ID, then generate a Client secret and copy that too.
- Paste your credentials into your
.env.local
file as follows:
Bonus Features
Google and Github OAuth configured
Beautiful login form
Beautiful login modal
Syncs perfectly with our database plugins
Demo authentication button to login and logout instantly