mirror of
https://github.com/logto-io/logto.git
synced 2024-12-23 20:33:16 -05:00
fix(core): revert add custom claims to id token (#919)
This reverts commit 9ccda932a4
.
This commit is contained in:
parent
207c404aeb
commit
fe99928a41
1 changed files with 9 additions and 10 deletions
|
@ -84,20 +84,19 @@ export default async function initOidc(app: Koa): Promise<Provider> {
|
|||
},
|
||||
// https://github.com/panva/node-oidc-provider/blob/main/recipes/client_based_origins.md
|
||||
clientBasedCORS: (_, origin, client) => isOriginAllowed(origin, client.metadata()),
|
||||
claims: {
|
||||
openid: ['sub', 'name', 'avatar', 'custom_data'],
|
||||
},
|
||||
findAccount: async (ctx, sub) => {
|
||||
const { name, avatar, customData } = await findUserById(sub);
|
||||
await findUserById(sub);
|
||||
|
||||
return {
|
||||
accountId: sub,
|
||||
claims: async () => ({
|
||||
sub,
|
||||
name,
|
||||
avatar,
|
||||
custom_data: customData,
|
||||
}),
|
||||
claims: async (use, scope, claims, rejected) => {
|
||||
console.log('use:', use);
|
||||
console.log('scope:', scope);
|
||||
console.log('claims:', claims);
|
||||
console.log('rejected:', rejected);
|
||||
|
||||
return { sub };
|
||||
},
|
||||
};
|
||||
},
|
||||
ttl: {
|
||||
|
|
Loading…
Reference in a new issue