auth0 / wt-cli

Webtask CLI - all you need is code
https://webtask.io
MIT License
322 stars 72 forks source link

wt init: Mail verification fails with HTTP status 500 #212

Closed Be-ngt-oH closed 6 years ago

Be-ngt-oH commented 6 years ago

Steps and output:

$ node -v
v10.3.0
$ wt -v
9.5.0
$ wt init [my-mail-address]
[...]
Unable to verify code sent to [my-mail-address] with HTTP status 500 and body {"error":"access_denied","error_description":"Cannot read property 'S' of undefined"}

We were unable to verify your identity.

I've tried it multiple times with the same result and then used verification via phone number which worked perfectly.

NotMyself commented 6 years ago

Thanks for reaching out. Sorry, you ran into this issue. We recently released a new authentication method for Webtask.io. The documentation is a bit stale. Can you try running the command this way?

AUTH_MODE=v2 wt init

You only need to do this step for the call to init, then the cli should work as expected.

Be-ngt-oH commented 6 years ago
$ node -v
v10.4.1
$ wt -v
9.5.0
$ AUTH_MODE=v2 wt init
Uncaught error:  The "url" argument must be of type string. Received type object
TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type object
    at Url.parse (url.js:150:11)
    at Object.urlParse [as parse] (url.js:144:13)
    at Function.UserAutenticator.create ([...]/wt-cli/lib/userAuthenticator.js:33:30)
    at detectAuthMode ([...]/wt-cli/bin/profile/init.js:101:30)
    at verifyUserOrReturnProfile ([...]/wt-cli/bin/profile/init.js:75:15)
    at tryCatcher ([...]/wt-cli/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler ([...]/wt-cli/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt ([...]/wt-cli/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromises ([...]/wt-cli/node_modules/bluebird/js/main/promise.js:700:14)
    at Async._drainQueue ([...]/wt-cli/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues ([...]/wt-cli/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] ([...]/wt-cli/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)
Please report this at: https://github.com/auth0/wt-cli/issues
NotMyself commented 6 years ago

Sorry, to clarify the command should be:

AUTH_MODE=v2 wt init [your-mail-address]

Be-ngt-oH commented 6 years ago

I have tried it with and without the mail address - same result.

jdillman1989 commented 6 years ago

I am encountering this exact same issue. I have also tried the AUTH_MODE=v2 wt init [your-mail-address] with the same results. My node and wt versions are the same as OP's.

tjrivera commented 6 years ago

I encountered a similar issue. I created a PR that should fix the issue -- it still requires AUTH_MODE=v2 to initialize a profile. I found the same 500 errors from the verification endpoint without using the v2 flow.

NotMyself commented 6 years ago

We recently released version 10.0.0 of our CLI. Please update your version with the command npm update -g wt-cli. This should resolve the error for you.

bkawin commented 3 years ago

node -v

v10.19.0

wt -v

12.1.0

AUTH_MODE=v2 wt init [my-mail-address] or wt init [my-mail-address]. it opens webtask.auth0.com/login page where if I choose my google account it says "This site can’t be reached" or "Authentication Failed" or "Oops!, something went wrong".. pls help

I tried choosing github account also instead of google account but still it says "Oops!, something went wrong".