firebase-tools - “无法解析授权令牌” [英] firebase-tools -- "Could not parse auth token"
问题描述
$ b
任何帮助都会非常感谢!!
(下面是失败命令的输出)。
$ b
[〜/ $] firebase --token-XXXXXjzTKnX9c_7qO | 9546a9bc98f70f0b5b55ceb08ca23156list
┌─────────── ─────────────────────────────────
│名称│计划│合作者│
├─────────────────────────┼────────────────────────────┤ b $ b│rentette│免费│nick@xxxxx.net│
├────────────────────────────────── ───────────────┤
[〜/ $] firebase --to ken-XXXXXjzTKnX9c_7qO | YYYYYYYYYYYYYYYY5ceb08ca23156data:get / -f rentette --debug
----------------------------- -----------------------------------------
命令:/ usr / bin / node /home/nhamilton/.npm-packages/bin/firebase --token -XXXXXjzTKnX9c_7qO | YYYYYYYYYYYYYYYY5ceb08ca23156 data:get / -f rentette --debug
平台:linux
Node版本:v5.10.1
时间:星期五Apr 15 2016 11:31:20 GMT + 1000(AEST)
------------------------- ---------------------------------------------
错误:无法解析授权令牌。
错误上下文:{
body:{
error:无法解析授权令牌。
,
response:{
statusCode:400,
headers:{
content-length:46,
content-type:application / json; charset = utf-8,
cache-control:no-cache,
strict-transport-security:max
uri:{
;
b $ b,
协议:https:,
slashes:true,
auth:null,
host:rentette.firebaseio.com,
port :443,
hostname:rentette.firebaseio.com,
hash:null,
search:?auth = -XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156,
query:auth = -XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156,
pathname:/.json,
path:/.json?auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156,
href:https://rentette.firebaseio.com/.json?auth=-XXXXXjzTKnX9c_7q O%7cYYYYYYYYYYYYYY5ceb08ca23156
,
method:GET,
headers:{}
}
}
}
我可以知道你的令牌从哪里来?如果您仍然使用旧版Firebase身份验证令牌,请更新您的令牌。因为我们现在更新了Firebase身份验证SDK,所以旧的令牌应该由新的身份验证SDK生成,否则将无法在新的Firebase上使用。
I was wondering if someone could see if there is anything that I am doing that is obviously wrong with running the firebase cli jode.js tool. I've tried a few tokens (some generated by the login:ci and some generated by a normal login), all to no avail. It seems that some commands are working (list, init), but I cannot get the data:get command to work. This seems to be a problem with the "--token" option: if I login normally ("firebase login") I am able to execute the "data:get / -f rentette" command without any problem.
Any help would be much appreciated!!
(Below is the output of the failing command).
[~/$] firebase --token "-XXXXXjzTKnX9c_7qO|9546a9bc98f70f0b5b55ceb08ca23156" list
┌──────────────────┬──────┬────────────────────┐
│ Name │ Plan │ Collaborators │
├──────────────────┼──────┼────────────────────┤
│ rentette │ Free │ nick@xxxxx.net │
├──────────────────┼──────┼────────────────────┤
[~/$] firebase --token "-XXXXXjzTKnX9c_7qO|YYYYYYYYYYYYYYYY5ceb08ca23156" data:get / -f rentette --debug
----------------------------------------------------------------------
Command: /usr/bin/node /home/nhamilton/.npm-packages/bin/firebase --token -XXXXXjzTKnX9c_7qO|YYYYYYYYYYYYYYYY5ceb08ca23156 data:get / -f rentette --debug
Platform: linux
Node Version: v5.10.1
Time: Fri Apr 15 2016 11:31:20 GMT+1000 (AEST)
----------------------------------------------------------------------
Error: Could not parse auth token.
Error Context: {
"body": {
"error": "Could not parse auth token."
},
"response": {
"statusCode": 400,
"headers": {
"content-length": "46",
"content-type": "application/json; charset=utf-8",
"cache-control": "no-cache",
"strict-transport-security": "max-age=31556926; includeSubDomains; preload",
"connection": "close"
},
"request": {
"uri": {
"protocol": "https:",
"slashes": true,
"auth": null,
"host": "rentette.firebaseio.com",
"port": 443,
"hostname": "rentette.firebaseio.com",
"hash": null,
"search": "?auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156",
"query": "auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156",
"pathname": "/.json",
"path": "/.json?auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156",
"href": "https://rentette.firebaseio.com/.json?auth=-XXXXXjzTKnX9c_7qO%7cYYYYYYYYYYYYYY5ceb08ca23156"
},
"method": "GET",
"headers": {}
}
}
}
May I know that where is your token coming from? If you still use legacy firebase authentication token, please update your token. Cause right now we updated firebase auth SDK, so the old token should be generated by the new auth SDK, otherwise it won't work on new Firebase.
这篇关于firebase-tools - “无法解析授权令牌”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!