-
Notifications
You must be signed in to change notification settings - Fork 1k
[Bug?]: Default dbAuth workflow leaks resetToken #6343
Copy link
Copy link
Closed
Labels
bug/confirmedWe have confirmed this is a bugWe have confirmed this is a bugrelease:fixThis PR is a fixThis PR is a fixtopic/auth
Description
What's not working?
After following the tutorial to get an idea of how redwood works, I was testing out the dbAuth functionality with the console open. I was looking at the response from the forgotPassword lambda (without changing anything from the scaffolded code) and it's returning the reset token:
{
"id": "b6e9b773-ecc1-4d27-bcdb-aa6729255bfe",
"email": "maddi@maddijoyce.com",
"resetToken": "ZTEyNzI3YjdjMjc1", // <-- This token allows me to reset
"resetTokenExpiresAt": "2022-09-06T11:35:07.169Z",
"createdAt": "2022-09-05T10:06:06.648Z"
}
How do we reproduce the bug?
Just follow the instructions here - https://redwoodjs.com/docs/auth/dbauth
At it's most basic, on a brand new redwood repo run:
yarn rw setup auth dbAuthyarn rw g dbAuth
What's your environment? (If it applies)
System:
OS: macOS 12.5
Shell: 3.3.1 - /opt/homebrew/bin/fish
Binaries:
Node: 16.13.0 - /private/var/folders/79/3b3vgxfs4633nxwvbjs0c0y00000gn/T/xfs-09c55961/node
Yarn: 3.2.1 - /private/var/folders/79/3b3vgxfs4633nxwvbjs0c0y00000gn/T/xfs-09c55961/yarn
Databases:
SQLite: 3.37.0 - /usr/bin/sqlite3
Browsers:
Chrome: 96.0.4664.55
Firefox: 104.0.1
Safari: 15.6
npmPackages:
@redwoodjs/core: 2.2.3 => 2.2.3Are you interested in working on this?
- I'm interested in working on this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug/confirmedWe have confirmed this is a bugWe have confirmed this is a bugrelease:fixThis PR is a fixThis PR is a fixtopic/auth