(core) Remove LoginSession, which was mainly serving situations that are no longer used.

Summary:
In the past, Cognito sign-ins were intended to give authorization to some AWS
services (like SQS); various tokens were stored in the session for this
purpose. This is no longer used. Profiles from Cognito now serve a limited
purpose: first-time initialization of name and picture, and keeping track of
which login method was used. For these remaining needs, ScopedSession is
sufficient.

Test Plan:
Existing test pass. Tested manually that logins work with Google and
Email + Password. Tested manually that on a clean database, name and picture
are picked up from a Google Login.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2907
This commit is contained in:
Dmitry S
2021-07-12 12:10:04 -04:00
parent f079ffdcb3
commit 869b2f00ec
14 changed files with 95 additions and 132 deletions

View File

@@ -73,8 +73,8 @@ export class TestingHooks implements ITestingHooks {
public async setLoginSessionProfile(gristSidCookie: string, profile: UserProfile|null, org?: string): Promise<void> {
log.info("TestingHooks.setLoginSessionProfile called with", gristSidCookie, profile, org);
const sessionId = this._comm.getSessionIdFromCookie(gristSidCookie);
const loginSession = this._comm.getOrCreateSession(sessionId, {org});
return await loginSession.testSetProfile(profile);
const scopedSession = this._comm.getOrCreateSession(sessionId, {org});
return await scopedSession.updateUserProfile(profile);
}
public async setServerVersion(version: string|null): Promise<void> {