- Have setup authentik with below config
({
id: "authentik",
name: "Authentik",
type: "oauth",
version: "2.0",
clientId: process.env.AUTHENTIK_CLIENT_ID,
clientSecret: process.env.AUTHENTIK_CLIENT_SECRET,
authorization: {
url: process.env.AUTHENTIK_AUTH_URL,
params: {
redirect_uri: process.env.AUTHENTIK_REDIRECT_URI,
scope: "openid profile email",
},
},
tokenUrl: process.env.AUTHENTIK_TOKEN_URL,
userinfo: {
url: process.env.AUTHENTIK_USER_INFO_URL,
},
profile(profile: User) {
return {
id: profile.id,
name: profile.name,
email: profile.email,
team: profile.team,
};
},
}) as OAuthConfig<User>
user is redirected to the authentik login page
on logging in, following error comes up:
error: [Error [OAuthCallbackError]: token_endpoint must be configured on the issuer] {
code: undefined
},
providerId: 'authentik',
message: 'token_endpoint must be configured on the issuer'
}
On digging in, I figured, code_verifier is not being set in the cookie. Is it something that nextjs does by default? or do we need to write the logic to set this code.