From 2eb172171f7efd2ea35d08ab4846cd46be031bb5 Mon Sep 17 00:00:00 2001 From: nkzawa Date: Fri, 3 Jun 2016 01:15:49 +0900 Subject: [PATCH] login: post tokenName --- lib/login.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/login.js b/lib/login.js index d48f240..4500d45 100644 --- a/lib/login.js +++ b/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: {