Skip to content

Commit

Permalink
Merge pull request #619 from Martii/googleScopeUpdateForDep
Browse files Browse the repository at this point in the history
Update deprecated Google classic/standard auth scope to use Google+ scope

Auto-merge
  • Loading branch information
Martii committed Apr 8, 2015
2 parents e0987b3 + b300317 commit 453104d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions controllers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ function getRedirect(aReq) {
exports.auth = function (aReq, aRes, aNext) {
var authedUser = aReq.session.user;
var strategy = aReq.body.auth || aReq.params.strategy;
var username = aReq.body.username || aReq.session.username ||
var username = aReq.body.username || aReq.session.username ||
(authedUser ? authedUser.name : null);
var authOpts = { failureRedirect: '/register?stratfail' };
var passportKey = aReq._passport.instance._key;

// Yet another passport hack.
// Yet another passport hack.
// Initialize the passport session data only when we need it.
if (!aReq.session[passportKey] && aReq._passport.session) {
aReq.session[passportKey] = {};
Expand All @@ -83,7 +83,7 @@ exports.auth = function (aReq, aRes, aNext) {
}

if (strategy === 'google') {
authOpts.scope = ['https://www.googleapis.com/auth/userinfo.profile'];
authOpts.scope = ['https://www.googleapis.com/auth/plus.login'];
}
authenticate = passport.authenticate(strategy, authOpts);

Expand Down
2 changes: 1 addition & 1 deletion views/includes/headerReminders.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="reminders">
{{^hideReminder}}
<div class="alert alert-warning alert-dismissible small fade in" role="alert">
<div class="alert alert-danger alert-dismissible small fade in" role="alert">
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<p><i class="fa fa-fw fa-exclamation-triangle"></i> <b>REMINDER:</b> Don't miss out reading the <a class="alert-link" href="/announcements/Google_Authentication_Deprecation">Google Authentication Deprecation</a> with migration announcement.</p>
</div>
Expand Down

0 comments on commit 453104d

Please sign in to comment.