Changes following review

This commit is contained in:
Richard Cox 2022-10-31 14:52:05 +00:00
parent 23ee18ef37
commit 1f68d5a825
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,6 @@ export default {
// The scopes in the redirect url are pulled out and reapplied, however this does not work for dex (a decoded space separator)
const scopes = redirectAsUrl.searchParams.get(`scope`); // This decodes it
const scopesArray = scopes.split(' ');
// redirectTo mangles the different scopes together incorrectly, and we're supply our own mangled version anyway, so nuke
redirectAsUrl.searchParams.delete('scope');
@ -28,8 +27,9 @@ export default {
this.redirectOpts = {
provider: this.name,
redirectUrl: redirectAsUrl.toString(),
scopes: scopesArray,
scopesJoinChart: ' ',
scopes: scopes.split(' '), // Put it in the format expcted by the `redirectTo` action
scopesJoinChar: ' ',
nonce: baseNonce,
persistNonce: {

View File

@ -242,7 +242,7 @@ export const actions = {
let url = removeParam(redirectUrl, GITHUB_SCOPE);
const params = {
[GITHUB_SCOPE]: scopes.join(opt.scopesJoinChart || ','), // Some providers won't accept comma separated scopes
[GITHUB_SCOPE]: scopes.join(opt.scopesJoinChar || ','), // Some providers won't accept comma separated scopes
[GITHUB_NONCE]: encodedNonce
};