Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
Getting Started
Providers
Eveonline

EVEOnline Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/eveonline

Environment Variables

AUTH_EVEONLINE_ID
AUTH_EVEONLINE_SECRET

Configuration

/auth.ts
import NextAuth from "next-auth"
import EveOnline from "next-auth/providers/eve-online"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [EveOnline],
})

Notes

  • When creating your application, make sure to select Authentication Only as the connection type.

  • If using JWT for the session, you can add the CharacterID to the JWT and session. For example:

const AuthConfig = {
  callbacks: {
    jwt({ token, user }) {
      if (user) {
        token.characterId = user.CharacterID
      }
      return token
    },
    session({ session, token }) {
      session.user.characterId = token.characterId
      return session
    },
  },
}
Auth.js © Balázs Orbán and Team - 2024