Skip to content

jonaslsaa/feide-provider-next-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Feide Provider for NextAuth (now Auth.js)

Customizable Feide Provider for NextAuth for support for custom scopes and claims.

Installation

Install the provider from npm.

npm install feide-provider-next-auth

Example usage

import { FeideProvider } from 'feide-provider-next-auth';

const FeideExtraScopes = ['email']
type ExtraClaims = { email: string; }; // Custom claims based on scope 'email'

export const authOptions: NextAuthOptions = {
  ...
  providers: [
    FeideProvider<ExtraClaims>({
      clientId: env.FEIDE_CLIENT_ID,
      clientSecret: env.FEIDE_CLIENT_SECRET,
      scopes: FeideExtraScopes,
      profileHandler: (profile) => { return { id: profile.sub, email: profile.email }; }
    }),
  ],
  ...
};

NextAuth Callback URL for Feide

https://[YOUR_DOMAIN]/api/auth/callback/feide

Base feide scopes

OpenID Configuration

  • openid
  • userid

About

FEIDE Provider for NextAuth (now Auth.js).

Resources

Stars

Watchers

Forks

Packages

No packages published