Unverified Commit 01233cc3 authored by Bradley Hilton's avatar Bradley Hilton
Browse files

Fix the base64url build issue

parent 9d95bc05
{
"name": "@rocket.chat/apps-cli",
"version": "1.5.0",
"version": "1.5.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......
......@@ -62,7 +62,7 @@ export class CloudAuth {
},
});
const codeChallenge = base64url(createHash('sha256').update(this.codeVerifier).digest('base64'));
const codeChallenge = this.base64url(createHash('sha256').update(this.codeVerifier).digest('base64'));
const authorizeUrl = this.buildAuthorizeUrl(codeChallenge);
cli.log(chalk.green('*') + ' ' + chalk.white('...if your browser does not open, open this:')
+ ' ' + chalk.underline(chalk.blue(authorizeUrl)));
......@@ -238,9 +238,9 @@ export class CloudAuth {
return s.manufacturer + ';' + s.uuid + ';' + String(c.processors) + ';'
+ c.vendor + ';' + m.total + ';' + o.platform + ';' + o.release;
}
// base64url - https://base64.guru/standards/base64url
private base64url(url: string) {
return url.replace( /\+/g, "-" ).replace( /\//g, "_" ).replace( /=+$/, "" );
return url.replace( /\+/g, '-' ).replace( /\//g, '_' ).replace( /=+$/, '' );
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment