d70e61f92e
Migrate from function-based social login helpers (`facebookLogin`, `googleLogin`) to class-based services (`new FacebookLogin().signIn()`, `new GoogleLogin().signIn()`), updating call sites in `AuthFacebookPanel` and `SplashButton` with try/catch error handling. The NextAuth route handler is also refactored to the v4 pattern, importing pre-built `GET` / `POST` exports from `@/lib/auth/nextauth` instead of constructing the handler inline with `NextAuth(authOptions)`.
868 B
868 B
id, title
| id | title |
|---|---|
| keycloak | Keycloak |
Documentation
https://www.keycloak.org/docs/latest/server_admin/#_oidc_clients
Configuration
:::tip Create an openid-connect client in Keycloak with "confidential" as the "Access Type". :::
Options
The Keycloak Provider comes with a set of default options:
You can override any of the options to suit your own use case.
Example
import KeycloakProvider from "next-auth/providers/keycloak";
...
providers: [
KeycloakProvider({
clientId: process.env.KEYCLOAK_ID,
clientSecret: process.env.KEYCLOAK_SECRET,
issuer: process.env.KEYCLOAK_ISSUER,
})
]
...
:::note
issuer should include the realm – e.g. https://my-keycloak-domain.com/realms/My_Realm
:::