NextAuth authentication using EasyAuth provider.
-
Sign in to EasyAuth and create a new 'Registered Client' with redirect URI set to
http://127.0.0.1:3000/auth/easyauth/callback. -
Clone the sample app.
git clone https://github.com/easyauth-io/easyauth-next-auth-example.git -
Copy
.envinto.env.localcp .env .env.local -
Edit
.env.localand set the parameters from your 'Registered Client' that you created in Step 1. -
Run
npm installfollowed bynpm run dev -
Visit http://127.0.0.1:3000
Note:
- Replace the port
3000in.env.localand redirect URI with the corresponding port where your app is runing. - Add
http://127.0.0.1:3000to the allowed origins at Registered Clients to fetch EasyAuth profile info.