include sub in standard claims
This commit is contained in:
parent
e394880539
commit
4d6267d40a
@ -62,6 +62,7 @@ export class ApiController {
|
|||||||
display_name: user.display_name,
|
display_name: user.display_name,
|
||||||
|
|
||||||
// Standard claims
|
// Standard claims
|
||||||
|
sub: user.uuid,
|
||||||
name: user.display_name,
|
name: user.display_name,
|
||||||
preferred_username: user.username,
|
preferred_username: user.username,
|
||||||
nickname: user.display_name,
|
nickname: user.display_name,
|
||||||
@ -72,7 +73,12 @@ export class ApiController {
|
|||||||
userData.email_verified = true;
|
userData.email_verified = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((scope.includes('image') || scopelessAccess) && user.picture) {
|
if (
|
||||||
|
(scope.includes('image') ||
|
||||||
|
scope.includes('picture') ||
|
||||||
|
scopelessAccess) &&
|
||||||
|
user.picture
|
||||||
|
) {
|
||||||
userData.image = `${this._config.get('app.base_url')}/uploads/${
|
userData.image = `${this._config.get('app.base_url')}/uploads/${
|
||||||
user.picture.file
|
user.picture.file
|
||||||
}`;
|
}`;
|
||||||
|
@ -87,6 +87,7 @@ export class OAuth2Controller {
|
|||||||
display_name: user.display_name,
|
display_name: user.display_name,
|
||||||
|
|
||||||
// Standard claims
|
// Standard claims
|
||||||
|
sub: user.uuid,
|
||||||
name: user.display_name,
|
name: user.display_name,
|
||||||
preferred_username: user.username,
|
preferred_username: user.username,
|
||||||
nickname: user.display_name,
|
nickname: user.display_name,
|
||||||
|
Reference in New Issue
Block a user