mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Improve flows for social auth users (#13862)
* Multiple fixes for social authentication flows * frontend changes * add missing computed property * Improvements to social flows * fix existing email error * minor fixes * fix space * fix test * fix lint Co-authored-by: SabreCat <sabe@habitica.com>
This commit is contained in:
@@ -38,6 +38,12 @@ schema.plugin(baseModel, {
|
||||
plainObj.flags.newStuff = originalDoc.checkNewStuff();
|
||||
}
|
||||
|
||||
if (plainObj.auth && plainObj.auth.local && originalDoc.auth.local.hashed_password) {
|
||||
plainObj.auth.local.has_password = true;
|
||||
} else if (plainObj.auth && plainObj.auth.local && originalDoc.auth.local.email) {
|
||||
plainObj.auth.local.has_password = false;
|
||||
}
|
||||
|
||||
return plainObj;
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user