providers/keycloak
default()β
default<
P
>(options
):OAuthConfig
<P
>
Add Keycloak login to your page.
Setupβ
Callback URLβ
https://example.com/api/auth/callback/keycloak
Configurationβ
import Auth from "@auth/core"
import Keycloak from "@auth/core/providers/keycloak"
const request = new Request(origin)
const response = await Auth(request, {
providers: [Keycloak({ clientId: KEYCLOAK_CLIENT_ID, clientSecret: KEYCLOAK_CLIENT_SECRET, issuer: KEYCLOAK_ISSUER, })],
})
Resourcesβ
tip
Create an openid-connect client in Keycloak with "confidential" as the "Access Type".
note
issuer should include the realm β e.g. https://my-keycloak-domain.com/realms/My_Realm