@easyauth.io/easyauth-next-auth
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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);

Readme

Keywords

none

Package Sidebar

Install

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

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

18.1 kB

Total Files

10

Last publish

Collaborators

  • ghoshbishakh-easyauth