fix(xo-server/_authenticateUser): don't use registerUser()

Introduced by 99605bf18
This commit is contained in:
Julien Fontanet
2023-08-03 10:25:15 +02:00
parent 606e3c4ce5
commit 7214016338
2 changed files with 3 additions and 4 deletions
+1
View File
@@ -29,6 +29,7 @@
<!--packages-start-->
- xo-server patch
- xo-server-auth-ldap patch
- xo-web patch
@@ -113,8 +113,6 @@ export default class {
// - `userId`
// - optionally `expiration` to indicate when the session is no longer
// valid
// - an object with a property `username` containing the name
// of the authenticated user
const result = await provider(credentials, userData)
// No match.
@@ -122,10 +120,10 @@ export default class {
continue
}
const { userId, username, expiration } = result
const { userId, expiration } = result
return {
user: await (userId !== undefined ? this._app.getUser(userId) : this._app.registerUser(undefined, username)),
user: await this._app.getUser(userId),
expiration,
}
} catch (error) {