feat: update user identity login

This commit is contained in:
Mrugesh Mohapatra
2018-05-19 21:21:49 +05:30
parent 764d040553
commit 4d48175e64
5 changed files with 124 additions and 96 deletions

View File

@@ -30,9 +30,8 @@ module.exports = function enableAuthentication(app) {
const { AuthToken, User } = app.models;
router.get('/email-signin', (req, res) => res.redirect(301, '/login'));
router.get('/signin', (req, res) => res.redirect(301, '/login'));
router.get('/signin', (req, res) => res.redirect(301, '/signup'));
router.get('/signout', (req, res) => res.redirect(301, '/logout'));
router.get('/signup', (req, res) => res.redirect(301, '/deprecated-signup'));
function getLegacySignUp(req, res) {
if (isSignUpDisabled) {
@@ -44,7 +43,7 @@ module.exports = function enableAuthentication(app) {
title: 'Sign in to freeCodeCamp using your Email Address'
});
}
router.get('/deprecated-signup', ifUserRedirect, getLegacySignUp);
router.get('/signup', ifUserRedirect, getLegacySignUp);
router.get('/login',
ifUserRedirect,
(req, res) => res.redirect(301, '/auth/auth0'));