mirror of
https://github.com/logto-io/logto.git
synced 2025-02-03 21:48:55 -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()),
|
||||
// https://github.com/panva/node-oidc-provider/blob/main/recipes/claim_configuration.md
|
||||
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
|
||||
findAccount: async (_ctx, sub) => {
|
||||
|
@ -102,7 +102,7 @@ export default async function initOidc(app: Koa): Promise<Provider> {
|
|||
username,
|
||||
name,
|
||||
avatar,
|
||||
roles: roleNames,
|
||||
roleNames,
|
||||
...(use === 'userinfo' && { customData }),
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue