如何使用 Github Oauth(使用 Passport.js)分别获取名字和姓氏?

How to get first and last name separately with Github Oauth (using Passport.js)?

如何从 Github OAuth API 中分别请求名字和姓氏?

我看过 scopes in the docs and even with read:user, the response only includes displayName, which concatenates (with spaces) the first and last name of the user. But separating them via split 带来的许多问题。

Github OAuth 是否支持提供名字和姓氏字段?

Name 字段是用户的自由格式输入,因此他们可以在其中输入任何内容。有很多 myths about names that programmers should be aware of,所以我建议您不要担心您的应用程序可以在这里处理什么。