From 9142aec8ad118fa4881a82a731e5d5c3ffc9752f Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Mon, 26 Dec 2016 01:30:38 -0600 Subject: [PATCH 1/2] improve github linking copy and error message --- server/boot/a-extendUserIdent.js | 7 +++---- server/boot/user.js | 5 ++++- server/views/account/settings.jade | 2 +- server/views/account/show.jade | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/server/boot/a-extendUserIdent.js b/server/boot/a-extendUserIdent.js index 3b8cbfea54..40e6d10c2f 100644 --- a/server/boot/a-extendUserIdent.js +++ b/server/boot/a-extendUserIdent.js @@ -53,10 +53,9 @@ export default function({ models }) { return Observable.throw( new Error( dedent` -Your GitHub is already associated with another account. -You may have accidentally created a duplicate account. -No worries, though. We can fix this real quick. -Please email us with your GitHub username: team@freecodecamp.com. +Your GitHub account is already linked to another Free Code Camp +account. To access it, Sign out of Free Code Camp, +then sign in again using the "Sign in with GitHub" button. `.split('/n').join(' ') ) ); diff --git a/server/boot/user.js b/server/boot/user.js index ad08bee719..b31a81e93f 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -227,7 +227,10 @@ module.exports = function(app) { function signout(req, res) { req.logout(); - res.redirect('/'); + req.flash('success', { + msg: `You have successfully signed out.` + }); + res.redirect('/signin'); } diff --git a/server/views/account/settings.jade b/server/views/account/settings.jade index 4733bab150..155366eaea 100644 --- a/server/views/account/settings.jade +++ b/server/views/account/settings.jade @@ -11,7 +11,7 @@ block content if (!user.isGithubCool) a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github') i.fa.fa-github - | Link my GitHub to unlock my portfolio + | Link my GitHub to enable my public profile else a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github') i.fa.fa-github diff --git a/server/views/account/show.jade b/server/views/account/show.jade index 5f27c6a6cc..4a27079e59 100644 --- a/server/views/account/show.jade +++ b/server/views/account/show.jade @@ -9,10 +9,10 @@ block content if (!user.isGithubCool) a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github') i.fa.fa-github - | Link my GitHub to unlock my portfolio + | Link my GitHub to enable my public profile .col-xs-12 a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/settings') - | Update your settings + | Update my settings .col-xs-12 a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='/signout') | Sign me out of Free Code Camp From d67acf626330fc135bb405f1c910872adc75e6bb Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Mon, 26 Dec 2016 01:32:48 -0600 Subject: [PATCH 2/2] fix linting error --- server/boot/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/boot/user.js b/server/boot/user.js index b31a81e93f..29e3338ba8 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -228,7 +228,7 @@ module.exports = function(app) { function signout(req, res) { req.logout(); req.flash('success', { - msg: `You have successfully signed out.` + msg: 'You have successfully signed out.' }); res.redirect('/signin'); }