Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 4a5882a

Browse files
committed
block raspberry linked accounts from logging in with pword
1 parent 323ea64 commit 4a5882a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

users.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,16 @@ module.exports = function (options) {
547547
if (err) return done(err);
548548
if (!loginResponse.ok || !loginResponse.user) return done(null, loginResponse);
549549

550+
if (loginResponse.user.raspberryId && !args.auto) {
551+
return done(null, {ok: false, login: null, user: null, why: 'raspberry-linked'});
552+
}
553+
550554
const handlers = [
551555
verifyPermissions,
552556
recordLogin
553557
];
554558

555-
if (!loginResponse.user.profilePassword) {
559+
if (!args.auto && !loginResponse.user.profilePassword) {
556560
handlers.push(updateProfilePassword);
557561
}
558562

0 commit comments

Comments
 (0)