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
.env
into.env.local
cp .env .env.local
-
Edit
.env.local
and set the parameters from your 'Registered Client' that you created in Step 1. -
Run
npm install
followed bynpm run dev
-
Visit http://127.0.0.1:3000
Note:
- Replace the port
3000
in.env.local
and redirect URI with the corresponding port where your app is runing. - Add
http://127.0.0.1:3000
to the allowed origins at Registered Clients to fetch EasyAuth profile info.