mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add authSubject and authProvider to sessions
Summary: This also updates Authorizer to link the authSubject to Grist users if not previously linked. Linked subjects are now used as the username for password-based logins, instead of emails, which remain as a fallback. Test Plan: Existing tests, and tested login flows manually. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3356
This commit is contained in:
@@ -1760,10 +1760,8 @@ export async function addSupportUserIfPossible() {
|
||||
if (!server.isExternalServer() && process.env.TEST_SUPPORT_API_KEY) {
|
||||
// Make sure we have a test support user.
|
||||
const dbManager = await server.getDatabase();
|
||||
const user = await dbManager.getUserByLoginWithRetry('support@getgrist.com', {
|
||||
email: 'support@getgrist.com',
|
||||
name: 'Support',
|
||||
});
|
||||
const profile = {email: 'support@getgrist.com', name: 'Support'};
|
||||
const user = await dbManager.getUserByLoginWithRetry('support@getgrist.com', {profile});
|
||||
if (!user) {
|
||||
throw new Error('Failed to create test support user');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user