auth0 在 Android 中获取有关 userProfile 的更多信息

伊门·阿奇乌里

我正在使用 Auth0 和 Android。我的目的是检索有关用户的更多信息,而不是电子邮件和姓名,例如用户的生日。但是当我记录 userProfile 对象时,我什至不能这样做;我有我喜欢的所有信息。但是当我喜欢在 textView 中显示例如生日时;我收到这个错误

error: cannot find symbol method getGender()

这就是我编写简单代码的方式:

birthdayTextView.setText(String.format(getString(R.string.birthday), userProfile.getGender()));
阿克塞尔登

该错误表明没有userProfile.getGender()功能。

Auth0 规范化用户配置文件包含这些属性

复制下面的完整性。但请注意,这gender是不可用的。

可能的解决方法:

一种)。可以向user_metadata(最终用户可编辑)或app_metadata(最终用户不可编辑添加自定义声明

b)。也可以通过规则向令牌添加自定义声明。

规范化的用户配置文件声明

app_metadata: the custom fields storing information about a user. These attributes contain information that influences the user's access;

blocked*: the true/false value indicating if the user has been blocked;

created_at: the timestamp of when the user profile was first created;

email (unique): the user's email address

email_verified: the true/false value indicating if the user has verified their email address;

identities: the array of objects with information about the user's identities:

connection: the name of the connection used to authenticate the user;
isSocial: the true/false value indicating if the connection is a social one or not;
provider: the entity that is authenticating the user (such as Facebook, Twitter, and so on);
user_id: the user's unique identifier for this connection/provider.
multifactor: the list of multifactor providers in which the user is enrolled;

last_ip*: the IP address associated with the user's last login;

last_login*: the timestamp of when the user last logged in;

logins_count*: the number of times the user has logged in;

name: the user's name;

nickname: the user's nickname;

phone_number: the user's phone number;

phone_verified: the true/false value indicating whether the user's phone number has been verified (only valid for users with SMS connections);

picture: the user's profile picture, click here to learn more about the picture field;

updated_at: the timestamp of when the user's profile was last updated/modified;

user_id (unique): the user's unique identifier;

user_metadata: the custom fields storing information about a user. These attributes should contain information about the user that does not impact what they can or cannot access (such as work and home addresses);

username (unique): the user's username.

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何在Android Studio中获取有关“等待目标设备上线”的更多信息?

如何在Android版Google Play结算中获取有关应用内购买的信息

检索Auth0中的用户个人资料信息

如何从PKCE流中的Auth0租户提供的auth_token获取用户信息

如何获取有关异常错误的更多信息?

Cucumber CLI - 获取有关执行的更多信息

Python-如何获取有关SyntaxError的更多信息?

如何获取有关python错误的更多信息?

如何获取有关套接字文件的更多信息?

获取有关“权限被拒绝”的更多信息

如何获取有关“功能”标志警告的更多信息?

获取有关Gradle构建错误的更多信息

如何获取有关此设备的更多信息?

有关动态编程的更多信息

有关Winform中Alpha混合模式的更多信息

使用MVC在html中单击文本时获取有关对象的更多信息

在Visual Studio(即时窗口)中获取有关已处理异常的更多详细信息

KendallTau:尝试在 stats.py 中获取有关 weightedtau() 的更多详细信息

如何获取有关Confluent中Zookeeper状态的更多信息

如何在MacOS Catalina中获取有关旧版系统扩展的更多信息?

如何在ember-simple-auth中获取有关当前经过身份验证的用户的详细信息?

获取有关图像中对象的信息

从 freertos 中的数据获取有关发送任务的信息

搜索并获取有关ReactJs中每个值的信息

如何从坐标中获取有关位置或状态的信息

在Crystal中获取有关继承链的信息

在sidekiq中获取有关特定队列的信息

如何在MySQL中获取有关DATABASES的信息?

如何获取有关DataGrid中验证错误的信息