Browse Source
Ask the user to agree with our ToS and Privacy Polic upon login
master
Matheus Fernandes
8 years ago
No known key found for this signature in database
GPG Key ID: DD07CA4EA7B65C4F
1 changed files with
8 additions and
0 deletions
-
lib/login.js
|
|
@ -13,6 +13,8 @@ const ora = require('ora') |
|
|
|
const pkg = require('./pkg') |
|
|
|
const ua = require('./ua') |
|
|
|
const cfg = require('./cfg') |
|
|
|
const info = require('./utils/output/info') |
|
|
|
const promptBool = require('./utils/input/prompt-bool') |
|
|
|
|
|
|
|
async function getVerificationData(url, email) { |
|
|
|
const tokenName = `Now CLI ${os.platform()}-${os.arch()} ${pkg.version} (${os.hostname()})` |
|
|
@ -65,6 +67,12 @@ async function register(url, {retryEmail = false} = {}) { |
|
|
|
|
|
|
|
process.stdout.write('\n') |
|
|
|
|
|
|
|
info(`By continuing, you declare that you agree with ${chalk.bold('https://zeit.co/terms')} and ${chalk.bold('https://zeit.co/privacy.')}`) |
|
|
|
if (!await promptBool('Continue?')) { |
|
|
|
info('Aborted.') |
|
|
|
process.exit() // eslint-disable-line unicorn/no-process-exit
|
|
|
|
} |
|
|
|
|
|
|
|
if (!validate(email)) { |
|
|
|
return register(url, {retryEmail: true}) |
|
|
|
} |
|
|
|