Skip to content

Commit 0de2944

Browse files
committed
fix: use email from body
1 parent 5349f17 commit 0de2944

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/routes/login.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ router.post("/", csrfProtection, (req, res, next) => {
9292
}
9393

9494
// Seems like the user authenticated! Let's tell hydra...
95-
9695
hydraAdmin
9796
.getOAuth2LoginRequest({ loginChallenge: challenge })
9897
.then((loginRequest) =>
@@ -101,7 +100,7 @@ router.post("/", csrfProtection, (req, res, next) => {
101100
loginChallenge: challenge,
102101
acceptOAuth2LoginRequest: {
103102
// Subject is an alias for user ID. A subject can be a random string, a UUID, an email address, ....
104-
subject: "[email protected]",
103+
subject: req.body.email,
105104

106105
// This tells hydra to remember the browser and automatically authenticate the user in future requests. This will
107106
// set the "skip" parameter in the other route to true on subsequent requests!

0 commit comments

Comments
 (0)