merge with main
This commit is contained in:
parent
9149bba868
commit
9b7e8ab276
10 changed files with 434 additions and 54 deletions
|
|
@ -52,6 +52,16 @@ router.get("/login/failed", (req, res) => {
|
|||
|
||||
router.get("/google", passport.authenticate("google", ["profile", "email"]));
|
||||
|
||||
router.post("/student/login", (req, res) => {
|
||||
passport.authenticate("student-auth"),
|
||||
(req, res) => {
|
||||
res.json({
|
||||
message: "Authenticated via external service",
|
||||
user: req.user,
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
router.get("/logout", (req, res) => {
|
||||
req.logOut();
|
||||
res.redirect(process.env.LOGIN_REDIRECT_URL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue