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
| Type | Constructors | Adapter required? |
|---|---|---|
oauth / oidc | github, google, oauth, oidc, azuread | Recommended |
credentials | credentials | No (JWT sessions) |
email | email | Yes |
passkey | passkey | Yes + 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 case | Provider |
|---|---|
| Social login | OAuth & OIDC |
| Email + password | Credentials |
| Magic link | Email & OTP |
| Passwordless biometric | Passkey |
| Microsoft work accounts | Azure AD |