Hi @viv (kinde),
I have below the entire auth url and code for kinde as a custom oauth provider with next auth.
https://<SUBDOMAIN>.kinde.com/oauth2/auth?response_type=code&client_id=<CLIENT_ID>&redirect_uri=https%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth%2Fcallback%2Fkinde-register&scope=openid+email+profile+offline&state=QCql6gPlaQrhXlgMLmwcXGMIDojecTh4okfTH%2B9x%2BZg%3D&prompt=registration&code_challenge=hQWse3RIXTo7wfpLzb1z7RmkGe85n9GBmtQNFpQD1SE&code_challenge_method=S256
Typescript
{
id: "kinde-register",
name: "Kinde Provider",
type: "oidc",
issuer: process.env.KINDE_ISSUER_URL,
clientId: process.env.KINDE_CLIENT_ID,
clientSecret: process.env.KINDE_CLIENT_SECRET,
wellKnown: process.env.KINDE_CLIENT_WELLKNOWN,
authorization: {
params: {
response_type: "code",
scope: "openid email profile offline",
state: process.env.AUTH_SECRET,
prompt: "registration",
},
},
profile(profile) {
return {
id: profile.sub,
name: profile.name,
email: profile.email,
image: profile.picture,
};
},
},