简体   繁体   English

如何从 firebase 令牌为用户访问创建日期?

[英]How can I access the created date from firebase token for a user?

How can I access created on from the userRecord object for a firebase user?对于 firebase 用户,我如何访问从 userRecord object 创建的? What are the other details that can be accessed using uid/email?可以使用 uid/email 访问的其他详细信息是什么? (using python) (使用蟒蛇)

I tried the following code and able to retrieve the uid.我尝试了以下代码并能够检索 uid。

user_obj = auth.get_user_by_email(email) 
uid=user_obj.uid   

From the documentation on get_user_by_email it seems that it returns a UserRecord object .get_user_by_email上的文档看来,它返回了一个UserRecord object This in turn contains a user_metadata property that has a creation_timestamp property .这又包含一个user_metadata属性,该属性具有creation_timestamp属性

So:所以:

user_obj.user_metadata.creation_timestamp

When signing up with firebase's password based auth, you are provided with email, password and other meta data.使用 firebase 的基于密码的身份验证进行注册时,会为您提供 email、密码和其他元数据。 You can get creation_timestamp from metadata See:您可以从元数据中获取creation_timestamp参见:

暂无
暂无

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

相关问题 如果我不需要用户访问令牌,如何使用请求从Python连接到Facebook Graph API? - How to connect to Facebook Graph API from Python using Requests if I do not need user access token? 如何从 django 序列化程序中的 jwt 令牌访问请求的用户 object? - How to access requested user object from jwt token in django serializers? 在Python中,如何从其他模块访问在主模块中创建的实例? - In Python, how can I access an instance created in main module from other module? 如何从使用 tf.contrib.layers.fully_connected 创建的层访问权重? - How can I access weights from a layer created with tf.contrib.layers.fully_connected? Python 2.7如何从存储在不同类中的列表访问由一个类创建的对象 - Python 2.7 How can I access objects created by one class from a list stored within a different class 如何处理 firebase 中过期的用户 ID 令牌? - How to handle expired user ID token in firebase? 如何抓取使用 python 创建配置文件的日期 - How can I scrape the date the profile was created using python 如何在 Python 中获取文件创建到我的 dataframe 中的日期? - How can I get the date a file was created into my dataframe in Python? 如何获得 ms graph 所需的访问令牌 - how can I get the access token needed for ms graph Spotify 授权代码(不是访问令牌)即将过期 - 我该如何避免这种情况? - Spotify authorization code (not access token) is expiring - how can I circumvent this?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM