|
|
@ -1,3 +1,4 @@ |
|
|
|
import os from 'os'; |
|
|
|
import chalk from 'chalk'; |
|
|
|
import fetch from 'node-fetch'; |
|
|
|
import * as cfg from './cfg'; |
|
|
@ -6,7 +7,8 @@ import { validate } from 'email-validator'; |
|
|
|
import readEmail from 'email-prompt'; |
|
|
|
|
|
|
|
async function getVerificationToken (url, email) { |
|
|
|
const data = JSON.stringify({ email }); |
|
|
|
const tokenName = `Now CLI (${os.hostname()})`; |
|
|
|
const data = JSON.stringify({ email, tokenName }); |
|
|
|
const res = await fetch(`${url}/now/registration`, { |
|
|
|
method: 'POST', |
|
|
|
headers: { |
|
|
|