Browse Source

Merge pull request #65 from zeit/add/token-name

Send token name
master
Guillermo Rauch 9 years ago
parent
commit
816f2c3af1
  1. 5
      lib/login.js

5
lib/login.js

@ -1,12 +1,15 @@
import os from 'os';
import chalk from 'chalk';
import fetch from 'node-fetch';
import * as cfg from './cfg';
import { stringify as stringifyQuery } from 'querystring';
import { validate } from 'email-validator';
import readEmail from 'email-prompt';
import pkg from '../../package.json';
async function getVerificationToken (url, email) {
const data = JSON.stringify({ email });
const tokenName = `Now CLI ${os.platform()}-${os.arch()} ${pkg.version} (${os.hostname()})`;
const data = JSON.stringify({ email, tokenName });
const res = await fetch(`${url}/now/registration`, {
method: 'POST',
headers: {

Loading…
Cancel
Save