From 623da2d6c028576b2ca0fc61ae0e656e2b8ab095 Mon Sep 17 00:00:00 2001 From: Bradley Hilton Date: Tue, 1 Oct 2019 14:03:44 -0500 Subject: [PATCH] Display the url for people to copy --- src/misc/cloudAuth.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/misc/cloudAuth.ts b/src/misc/cloudAuth.ts index 88d7736..aea8802 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(); -- GitLab