mirror of
https://github.com/logto-io/logto.git
synced 2025-02-10 21:58:23 -05:00
refactor(core): align role_names
claim with DB (#1016)
This commit is contained in:
parent
9f68a7a124
commit
8a52c84e32
1 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ export default async function initOidc(app: Koa): Promise<Provider> {
|
||||||
ctx.request.origin === origin || isOriginAllowed(origin, client.metadata()),
|
ctx.request.origin === origin || isOriginAllowed(origin, client.metadata()),
|
||||||
// https://github.com/panva/node-oidc-provider/blob/main/recipes/claim_configuration.md
|
// https://github.com/panva/node-oidc-provider/blob/main/recipes/claim_configuration.md
|
||||||
claims: {
|
claims: {
|
||||||
profile: ['username', 'name', 'avatar', 'roles'],
|
profile: ['username', 'name', 'avatar', 'role_names', 'custom_data'],
|
||||||
},
|
},
|
||||||
// https://github.com/panva/node-oidc-provider/tree/main/docs#findaccount
|
// https://github.com/panva/node-oidc-provider/tree/main/docs#findaccount
|
||||||
findAccount: async (_ctx, sub) => {
|
findAccount: async (_ctx, sub) => {
|
||||||
|
@ -102,7 +102,7 @@ export default async function initOidc(app: Koa): Promise<Provider> {
|
||||||
username,
|
username,
|
||||||
name,
|
name,
|
||||||
avatar,
|
avatar,
|
||||||
roles: roleNames,
|
roleNames,
|
||||||
...(use === 'userinfo' && { customData }),
|
...(use === 'userinfo' && { customData }),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue