Browse Source

login: post tokenName

master
nkzawa 9 years ago
parent
commit
2eb172171f
  1. 4
      lib/login.js

4
lib/login.js

@ -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: {

Loading…
Cancel
Save