1.0.1 • Published 10 months ago

@easyauth.io/easyauth-next-auth v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

easyauth-next-auth

EasyAuth provider for next-auth.

Installation

The EasyAuth provider is installed with npm.

npm install @easyauth.io/easyauth-next-auth

Usage

Create an application at EasyAuth and register a new client. Add http://127.0.0.1:3000/auth/easyauth/callback to the Redirect URL and pass clientID and clientSecret to the provider.

Note: Change the Redirect URL port 3000 to the corresponding port where your app is running.

// [...nextauth].js

import NextAuth from 'next-auth';

export const authOptions = {
  providers: [
    EasyAuth({
      clientId: process.env.EASYAUTH_CLIENT_ID,
      clientSecret: process.env.EASYAUTH_CLIENT_SECRET,
      tenantURL: provess.env.EASYAUTH_TENANT_URL,
    }),
    //...
  ],
  //...
  },
};
export default NextAuth(authOptions);
1.0.1

10 months ago

1.0.0

11 months ago