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

Wikimedia Provider

Resources

Setup

Callback URL

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

Environment Variables

AUTH_WIKIMEDIA_ID
AUTH_WIKIMEDIA_SECRET

Configuration

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

After registration, you can initially test your application only with your own Wikimedia account. You may have to wait several days for the application to be approved for it to be used by everyone.

Notes

This provider also supports all Wikimedia projects:

  • Wikipedia
  • Wikidata
  • Wikibooks
  • Wiktionary
  • etc..

Please be aware that Wikimedia accounts do not have to have an associated email address. So you may want to add check if the user has an email address before allowing them to login.

Auth.js © Balázs Orbán and Team - 2024