diff --git a/src/misc/cloudAuth.ts b/src/misc/cloudAuth.ts index 88d7736a3de93cf17c1c5e54b86afe95ef756f9c..aea8802ab813d74491f0c990f51fa0554ee6a982 100644 --- a/src/misc/cloudAuth.ts +++ b/src/misc/cloudAuth.ts @@ -1,5 +1,7 @@ import { Request, Server } from '@hapi/hapi'; import axios from 'axios'; +import chalk from 'chalk'; +import { cli } from 'cli-ux'; import Conf = require('conf'); import { createHash } from 'crypto'; import open = require('open'); @@ -62,6 +64,9 @@ export class CloudAuth { const codeChallenge = 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))); + open(authorizeUrl); this.server.start();