fix(core): Use correct scopes-separator when generating authorization urls (#6502)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-06-21 15:19:38 +02:00
committed by GitHub
parent 6ab350209d
commit 5bf83f8bf6
8 changed files with 53 additions and 57 deletions

View File

@@ -29,7 +29,7 @@ describe('CodeFlow', () => {
expect(githubAuth.code.getUri()).toEqual(
`${config.authorizationUri}?client_id=abc&` +
`redirect_uri=${encodeURIComponent(config.redirectUri)}&` +
'response_type=code&state=&scope=notifications',
'response_type=code&scope=notifications',
);
});
@@ -46,7 +46,7 @@ describe('CodeFlow', () => {
expect(authWithoutScopes.code.getUri()).toEqual(
`${config.authorizationUri}?client_id=abc&` +
`redirect_uri=${encodeURIComponent(config.redirectUri)}&` +
'response_type=code&state=',
'response_type=code',
);
});
});
@@ -64,7 +64,7 @@ describe('CodeFlow', () => {
expect(authWithEmptyScopes.code.getUri()).toEqual(
`${config.authorizationUri}?client_id=abc&` +
`redirect_uri=${encodeURIComponent(config.redirectUri)}&` +
'response_type=code&state=&scope=',
'response_type=code&scope=',
);
});
@@ -81,7 +81,7 @@ describe('CodeFlow', () => {
expect(authWithEmptyScopes.code.getUri()).toEqual(
`${config.authorizationUri}?client_id=abc&` +
`redirect_uri=${encodeURIComponent(config.redirectUri)}&` +
'response_type=code&state=&scope=',
'response_type=code&scope=',
);
});
@@ -99,7 +99,7 @@ describe('CodeFlow', () => {
expect(authWithParams.code.getUri()).toEqual(
`${config.authorizationUri}?bar=qux&client_id=abc&` +
`redirect_uri=${encodeURIComponent(config.redirectUri)}&` +
'response_type=code&state=&scope=notifications',
'response_type=code&scope=notifications',
);
});
});