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,
|
||||
|
||||
// Standard claims
|
||||
sub: user.uuid,
|
||||
name: user.display_name,
|
||||
preferred_username: user.username,
|
||||
nickname: user.display_name,
|
||||
@ -72,7 +73,12 @@ export class ApiController {
|
||||
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/${
|
||||
user.picture.file
|
||||
}`;
|
||||
|
@ -87,6 +87,7 @@ export class OAuth2Controller {
|
||||
display_name: user.display_name,
|
||||
|
||||
// Standard claims
|
||||
sub: user.uuid,
|
||||
name: user.display_name,
|
||||
preferred_username: user.username,
|
||||
nickname: user.display_name,
|
||||
|
Reference in New Issue
Block a user