Skip to main content

Providers overview

Each provider is a value implementing goauth.Provider:

type Provider interface {
ID() string
Name() string
Type() ProviderType
}

Register providers in Config.Providers. Routes are always:

  • GET/POST {base}/signin/{id}
  • GET/POST {base}/callback/{id}

Provider types

TypeConstructorsAdapter required?
oauth / oidcgithub, google, oauth, oidc, azureadRecommended
credentialscredentialsNo (JWT sessions)
emailemailYes
passkeypasskeyYes + AuthenticatorStore

Public provider JSON

GET /auth/providers returns Auth.js-compatible metadata:

{
"github": {
"id": "github",
"name": "GitHub",
"type": "oauth",
"signinUrl": "https://app.example.com/auth/signin/github",
"callbackUrl": "https://app.example.com/auth/callback/github"
}
}

Choosing a provider

Use caseProvider
Social loginOAuth & OIDC
Email + passwordCredentials
Magic linkEmail & OTP
Passwordless biometricPasskey
Microsoft work accountsAzure AD