mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-04 08:37:14 +00:00
fix(cloud): provision login workspace just in time (#2505)
* fix(cloud): provision login workspace just in time * fix(oauth): send callback URI during code exchange * fix(oauth): preserve callback URI through browser exchange * fix(oauth): negotiate redirect-bound codes --------- Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
This commit is contained in:
@@ -7,11 +7,13 @@ const source = fs.readFileSync(
|
||||
'utf8',
|
||||
);
|
||||
|
||||
test('normal Cloud login enters through the Space Workspace launcher', () => {
|
||||
assert.match(source, /cloudEntry:\s*!getPendingInvitationToken\(\)/);
|
||||
assert.match(source, /getSpaceAuthorizeUrl\(redirectUri,\s*\{/);
|
||||
test('normal Cloud login uses the standard Space OAuth callback path', () => {
|
||||
assert.doesNotMatch(source, /cloudEntry/);
|
||||
assert.match(source, /getSpaceAuthorizeUrl\(redirectUri\)/);
|
||||
});
|
||||
|
||||
test('invitation login remains on the OAuth callback path', () => {
|
||||
assert.match(source, /cloudEntry:\s*!getPendingInvitationToken\(\)/);
|
||||
test('invitation login uses the same OAuth callback before accepting the invitation', () => {
|
||||
assert.doesNotMatch(source, /cloudEntry/);
|
||||
assert.match(source, /const invitationToken = getPendingInvitationToken\(\)/);
|
||||
assert.match(source, /acceptWorkspaceInvitation\(invitationToken\)/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user