盖伊Google 帐户 API(或 OpenId)- 唯一用户名

发布于 2024-09-14 22:31:35 字数 155 浏览 1 评论 0原文

任何人都对我如何为每个用户获得唯一的用户名(而不是电子邮件地址)有任何想法。理想情况下,我会向他们显示一个页面,要求他们指定网站的用户名,但我能想到的唯一方法是在他们通过 G 帐户或 OpenId 进行身份验证后向他们显示该用户名。但是,这需要另一个页面,如果他们不输入任何内容就导航离开怎么办?

Anyone have any ideas on how I could get a unique username (but not the email address) for each user. Ideally, I'd show them a page asking them to specify a username for the site, but the only way I can think of doing that is to show it to them after they've authenticated via G Accounts or OpenId. But, that requires another page, and what if they navigate away without entering anything?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最近可好 2024-09-21 22:31:35

正如您所建议的,您需要在他们第一次登录后询问他们。只需将他们重定向到该页面,直到他们填写完毕即可。

不过,如果您确实需要用户名,请认真考虑。很多网站都需要一个,但使用它的次数很少 - 而且用户必须尝试选择一个独特的,这很不方便。

As you suggest, you need to ask them after they log in for the first time. Simply redirect them to that page until they fill it out.

Consider seriously, though, if you really need a username. A lot of sites demand one, but then use it for very little - and it's inconvenient for users to have to try and choose a unique one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文