简体   繁体   English

为什么Firebase的accessToken在如此奇怪的标题下?

[英]Why is the Firebase `accessToken` under such a strange heading?

Background 背景

I have authenticated a user successfully with firebase in the client. 我已在客户端中使用Firebase成功验证了用户。

let fbAuthCreds = await this.props.firebase.auth().signInWithEmailAndPassword(email, password);

When I log this I get an object full of very strange looking keys example 当我登录时,我得到一个充满看起来很奇怪的键示例的对象

Ac, D, Ga, Sa, Yd, ba, fa, g, refreshToken, vc, ze Ac,D,Ga,Sa,Yd,ba,fa,g,refreshToken,vc,ze

Most of these I have no idea what they mean (except refreshToken , email .etc) 其中大多数我不知道它们的意思( refreshTokenemail等)

I found that the actual accessToken id the one that says Yd 我发现实际的accessToken id表示Yd

Question

Why does firebase send back such strange objects with non human readable names? Firebase为什么用不易读的名称发送回这些奇怪的对象?

Also I would like to send the token to my node server but writing fbAuthCreds.Yd seems not right, how should I retrieve it? 另外我想将令牌发送到我的节点服务器,但是写fbAuthCreds.Yd似乎不正确,我应该如何检索它?

Additional Note 附加说明

I did get this auth process into redux with react-redux-firebase (Awesome library) and can see a much nicer path to retrieve the data but it fails and says undefined when I try to get hold of it. 我确实使用react-redux-firebase (Awesome库)将这个身份验证过程放到了redux中,可以看到检索数据更好的路径,但是它失败了,当我尝试获取它时说未定义。

Look at line 23-27 there are proper names for the tokens and they should be retrievable 查看第23-27行 ,令牌有正确的名称,应该可以检索到

在此处输入图片说明

Why does firebase send back such strange objects with non human readable names? Firebase为什么用不易读的名称发送回这些奇怪的对象?

The code is minified to save bandwidth and memory. 该代码已精简以节省带宽和内存。 Methods and fields that are part of the public API are left unmodified during this process. 在此过程中,不修改属于公共API的方法和字段。

Note that the minified names may change between builds, so you should not rely on them staying the same. 请注意,缩小的名称可能在构建之间改变,因此您不应该依赖它们保持不变。 Instead use the methods from the public API of the user object , eg User.getToken . 而是使用来自用户对象公共API的方法,例如User.getToken

我想知道为什么我们使用第一个道具?.heading 和 in <field why we r using heading="“”</div"><div id="text_translate"><pre> import React from "react"; import Field from "sleek-ui/Field"; import {InputStyle, Heading, SubHeading, DisplayHeading} from "./style"; const FieldComponent = (props) =&gt; { return ( &lt;React.Fragment&gt; {props?.heading &amp;&amp; &lt;Heading&gt; {props?.heading}&lt;/Heading&gt;} {props?.subHeading &amp;&amp; &lt;SubHeading&gt; {props?.subHeading}&lt;/SubHeading&gt;} &lt;Field {...props} heading="" subHeading="" displayName={&lt;DisplayHeading&gt;{props.displayName}&lt;/DisplayHeading&gt;} styles={props.styles? props.styles: InputStyle} /&gt; &lt;/React.Fragment&gt; ); }; export default FieldComponent;</pre><p> 我想知道为什么我们使用第一个道具?.heading 和 &lt;field 为什么我们 r 使用 heading="" 它的用途是什么以及为什么它是空的</p></div></field> - I want to know why we are using 1st props?.heading and in <field why we r using heading=“”

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用javascript获取firebase 3的accessToken - How to get accessToken for firebase 3 using javascript Firebase 3 - javascript - 登录后获取facebook accessToken - Firebase 3 - javascript - get facebook accessToken after login Firebase函数上的TypeScript中twilio.AccessToken是“不是构造函数” - twilio.AccessToken is “not a constructor” in TypeScript on Firebase Functions DataGrid在标题下显示奇怪的复选框 - DataGrid shows strange Checkboxes below heading Firebase删除奇怪的行为 - Firebase remove strange behaviour 为什么我的JavaScript无法重新定位该标题? - Why does my javascript not reposition this heading? 为什么要在标题和正文中添加表格数据? - Why is the table data being added to the heading and the body? firebase存储cors奇怪的行为 - firebase storage cors strange Behaviour Firebase:奇怪的错误:操作取消 - Firebase: strange error: Operation cancelled 我想知道为什么我们使用第一个道具?.heading 和 in <field why we r using heading="“”</div"><div id="text_translate"><pre> import React from "react"; import Field from "sleek-ui/Field"; import {InputStyle, Heading, SubHeading, DisplayHeading} from "./style"; const FieldComponent = (props) =&gt; { return ( &lt;React.Fragment&gt; {props?.heading &amp;&amp; &lt;Heading&gt; {props?.heading}&lt;/Heading&gt;} {props?.subHeading &amp;&amp; &lt;SubHeading&gt; {props?.subHeading}&lt;/SubHeading&gt;} &lt;Field {...props} heading="" subHeading="" displayName={&lt;DisplayHeading&gt;{props.displayName}&lt;/DisplayHeading&gt;} styles={props.styles? props.styles: InputStyle} /&gt; &lt;/React.Fragment&gt; ); }; export default FieldComponent;</pre><p> 我想知道为什么我们使用第一个道具?.heading 和 &lt;field 为什么我们 r 使用 heading="" 它的用途是什么以及为什么它是空的</p></div></field> - I want to know why we are using 1st props?.heading and in <field why we r using heading=“”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM