Working version 6.2
This commit is contained in:
@@ -20,6 +20,7 @@ export const authConfig: NextAuthConfig = {
|
||||
issuer: process.env.ZITADEL_ISSUER!,
|
||||
clientId: process.env.ZITADEL_CLIENT_ID!,
|
||||
clientSecret: process.env.ZITADEL_CLIENT_SECRET!,
|
||||
idToken: false,
|
||||
authorization: {
|
||||
params: {
|
||||
scope:
|
||||
@@ -38,6 +39,7 @@ export const authConfig: NextAuthConfig = {
|
||||
callbacks: {
|
||||
async jwt({ token, account, profile }) {
|
||||
if (account && profile) {
|
||||
console.log("ZITADEL profile claims:", JSON.stringify(profile, null, 2));
|
||||
const claims = profile as unknown as ZitadelClaims;
|
||||
token.orgId = claims["urn:zitadel:iam:user:resourceowner:id"];
|
||||
token.orgName = claims["urn:zitadel:iam:user:resourceowner:name"];
|
||||
|
||||
Reference in New Issue
Block a user