fix(xo-server-auth-google): bad argument passed to registerUser2 (#7031)

Introduced by 91b19d9bc4
See https://xcp-ng.org/forum/topic/7729
This commit is contained in:
Pierre Donias
2023-09-12 11:21:28 +02:00
committed by GitHub
parent 0104649b84
commit 7773edd590
2 changed files with 6 additions and 2 deletions
+2
View File
@@ -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 @@
<!--packages-start-->
- xo-server patch
- xo-server-auth-google patch
- xo-server-netbox minor
<!--packages-end-->
+4 -2
View File
@@ -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) {