diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index b4299149aa2..ca7d1a955b3 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -14,6 +14,7 @@ > Users must be able to say: “I had this issue, happy to know it's fixed” - [Backup/Restore] Fix `Cannot read properties of undefined (reading 'id')` error when restoring via an XO Proxy (PR [#7026](https://github.com/vatesfr/xen-orchestra/pull/7026)) +- [Google Auth] Fix `Internal Server Error` (xo-server: `Cannot read properties of undefined (reading 'id')`) when logging in with Google [Forum#7729](https://xcp-ng.org/forum/topic/7729) (PR [#7031](https://github.com/vatesfr/xen-orchestra/pull/7031)) ### Packages to release @@ -32,6 +33,7 @@ - xo-server patch +- xo-server-auth-google patch - xo-server-netbox minor diff --git a/packages/xo-server-auth-google/src/index.js b/packages/xo-server-auth-google/src/index.js index 08ed1dd5503..a89fea2d6e2 100644 --- a/packages/xo-server-auth-google/src/index.js +++ b/packages/xo-server-auth-google/src/index.js @@ -53,8 +53,10 @@ class AuthGoogleXoPlugin { done( null, await xo.registerUser2('google', { - id: profile.id, - name: conf.scope === 'email' ? profile.emails[0].value : profile.displayName, + user: { + id: profile.id, + name: conf.scope === 'email' ? profile.emails[0].value : profile.displayName, + }, }) ) } catch (error) {