Skip to content

Commit

Permalink
Passport JS integrate and update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sid-0602 committed Jul 27, 2023
1 parent 5da43c2 commit 074167b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ConnectIO/controllers/users_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ module.exports.profile = function(req,res){

//render the sign up page.
module.exports.signUp= function(req,res){
if(req.isAuthenticated()){
return res.redirect('/users/profile');
}

return res.render('../views/user_sign_up.ejs',{
title: "ConnectIO | Sign Up"
})
Expand All @@ -18,6 +22,10 @@ module.exports.signUp= function(req,res){

//render signIn page.
module.exports.signIn= function(req,res){

if(req.isAuthenticated()){
return res.redirect('/users/profile');
}
return res.render('../views/user_sign_in.ejs',{
title: "ConnectIO | Sign In"
})
Expand Down

0 comments on commit 074167b

Please sign in to comment.