Return 来自 Reddit 的带有 passport-reddit 的电子邮件
Return email from Reddit with passport-reddit
我正在使用 passport-reddit 在我的 node.js 网络服务器上实现 Reddit 登录系统。我的系统 return 提供了我的用户所需的所有信息,除了他们的电子邮件地址。
我想知道社区中是否有人知道要包含的范围以告诉 Reddit return 一个电子邮件地址,或者是否有可能。
我当前的 Reddit 路线:
// Setting the reddit oauth routes
app.route('/api/auth/reddit')
.get(passport.authenticate('reddit', {
state: ' ',
duration: 'permanent',
failureRedirect: '/auth/login',
//scope: ['email']
}), users.signin);
app.route('/api/auth/reddit/callback')
.get(passport.authenticate('reddit', {
failureRedirect: '/auth/login',
}), users.authCallback);
OP 的问题已经过时了,我 link 的答案也是如此。似乎返回任何个人信息都违反了 reddit 的 "rules"。
https://www.reddit.com/r/redditdev/comments/2lrcdv/oauth2_featureapi_request_being_able_to_see_the/
您可以检索 reddit 用户的用户名,没有名字/姓氏,但有电子邮件。
返回了许多其他数据,但可能对您没有用。
verified: false,
over_18: true,
is_gold: false,
is_mod: false,
has_verified_email: true,
等等...
我正在使用 passport-reddit 在我的 node.js 网络服务器上实现 Reddit 登录系统。我的系统 return 提供了我的用户所需的所有信息,除了他们的电子邮件地址。 我想知道社区中是否有人知道要包含的范围以告诉 Reddit return 一个电子邮件地址,或者是否有可能。
我当前的 Reddit 路线:
// Setting the reddit oauth routes
app.route('/api/auth/reddit')
.get(passport.authenticate('reddit', {
state: ' ',
duration: 'permanent',
failureRedirect: '/auth/login',
//scope: ['email']
}), users.signin);
app.route('/api/auth/reddit/callback')
.get(passport.authenticate('reddit', {
failureRedirect: '/auth/login',
}), users.authCallback);
OP 的问题已经过时了,我 link 的答案也是如此。似乎返回任何个人信息都违反了 reddit 的 "rules"。
https://www.reddit.com/r/redditdev/comments/2lrcdv/oauth2_featureapi_request_being_able_to_see_the/
您可以检索 reddit 用户的用户名,没有名字/姓氏,但有电子邮件。
返回了许多其他数据,但可能对您没有用。
verified: false,
over_18: true,
is_gold: false,
is_mod: false,
has_verified_email: true,
等等...