feat(server): auto refresh session (#6613)

This commit is contained in:
EYHN committed 2024-04-19 07:00:12 +00:00
1 parent a2fa9149ff
commit 5e243de392
7 files changed
+82 -16

No files matched your search

@@ -303,7 +303,7 @@ test('should throw if oauth account already connected', async t => {
});
// @ts-expect-error mock
Sinon.stub(auth, 'getUser').resolves({ id: 'u2-id' });
Sinon.stub(auth, 'getUser').resolves({ user: { id: 'u2-id' } });
mockOAuthProvider(app, 'u2@affine.pro');
@@ -325,7 +325,7 @@ test('should be able to connect oauth account', async t => {
const { app, u1, auth, db } = t.context;
// @ts-expect-error mock
Sinon.stub(auth, 'getUser').resolves({ id: u1.id });
Sinon.stub(auth, 'getUser').resolves({ user: { id: u1.id } });
mockOAuthProvider(app, u1.email);