bug fix for login via google
This commit is contained in:
parent
adb005ae33
commit
b3dcec17c0
3 changed files with 6 additions and 5 deletions
|
|
@ -60,9 +60,10 @@ passport.serializeUser((user, done) => {
|
|||
// done(null, user);
|
||||
console.log("Serializing user:", user);
|
||||
done(null, {
|
||||
id: user.assignmentid || user.emal,
|
||||
id: user.assignmentid || user.id,
|
||||
displayName: user.studentname || user.displayName,
|
||||
role: user.role,
|
||||
emails: user.emails || "none",
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ router.post(
|
|||
|
||||
console.log('is authenticated?: ' + req.isAuthenticated());
|
||||
|
||||
return res.json({
|
||||
return res.status(200).json({
|
||||
success: true,
|
||||
message: 'Successful Login',
|
||||
user: req.user
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
|
||||
|
||||
#use this when testing local, remmber to run the proxy command
|
||||
# DATABASE_URL="postgresql://postgres:wly9H8gjjmxYfg1@localhost:15432/postgres?schema=public"
|
||||
DATABASE_URL="postgresql://postgres:wly9H8gjjmxYfg1@localhost:15432/postgres?schema=public"
|
||||
|
||||
DATABASE_URL="postgres://postgres:wly9H8gjjmxYfg1@bytecamp-db.flycast:5432?sslmode=disable"
|
||||
# DATABASE_URL="postgres://postgres:wly9H8gjjmxYfg1@bytecamp-db.flycast:5432?sslmode=disable"
|
||||
# DATABASE_URL=postgres://snakebyte:zVB7lgOiKr89dq6@localhost:5432/snakebyte?sslmode=disable
|
||||
NODE_PORT=3000
|
||||
NODE_PORT=3100
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue