Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -32,6 +33,7 @@
<!--packages-start-->

- xo-server patch
- xo-server-auth-google patch
- xo-server-netbox minor

<!--packages-end-->
6 changes: 4 additions & 2 deletions packages/xo-server-auth-google/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down