From f4d99dba3f6670be87ff7a400591d0794d4c335d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wr=C3=B3tniak?= Date: Tue, 14 Feb 2017 18:26:48 +0100 Subject: [PATCH] Rejected email hardcoded HTML replaced with template. --- lib/units/auth/oauth2/index.js | 3 +-- res/app/views/rejected-email.pug | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 res/app/views/rejected-email.pug diff --git a/lib/units/auth/oauth2/index.js b/lib/units/auth/oauth2/index.js index 1e8a23cc..30144d55 100644 --- a/lib/units/auth/oauth2/index.js +++ b/lib/units/auth/oauth2/index.js @@ -57,8 +57,7 @@ module.exports = function(options) { } else { log.warn('Missing or disallowed email in profile', req.user) - res.send('Missing or rejected email address ' + - 'Retry') + res.render('rejected-email') } } ) diff --git a/res/app/views/rejected-email.pug b/res/app/views/rejected-email.pug new file mode 100644 index 00000000..920c0656 --- /dev/null +++ b/res/app/views/rejected-email.pug @@ -0,0 +1,10 @@ +doctype html +html + head + meta(charset='utf-8') + base(href='/') + title("STF") + body + Missing or rejected email address + a(href='/auth/oauth/') + Retry