Commit Graph

3 Commits

Author SHA1 Message Date
Barış Uşaklı
e2e1744824 User create / registeration queue refactor (#13905)
* feat: add options parameter to User.create

add emailVerification: ('send'|'verify'|'skip') param to User.create to control email verification

add a new method User.createOrQueue(). store options that will be passed to User.create() when registration is accepted in _opts

If there is no password passed to registration queue(SSO register) don't store hashedPassword

removed the isFirstUser hack in user.create, when creating the admin user in install.js passing `emailVerification: 'verify'` to immediately verify the email, same with all the hacks in tests

auth: if an SSO plugin sends back an info object, redirect to root and display the message

* refactor: make function private

* refactor: destruct return

* test: fix flag test

* test: group tests

* feat: show ssoIcon if available in register queue

* add icon/title
2026-01-19 18:40:48 -05:00
Julian Lam
9dc9d5ef54 test: remove errant .only() 2023-09-11 14:27:14 -04:00
Julian Lam
a344e6ec0c Fix for #11119, restore password reset rate limiting (#11120)
* chore: incrementing version number - v2.8.1

* chore: update changelog for v2.8.1

* fix: accidental clearing of reset rate limiting on reset send

* test: move user reset tests to its own file, add failing test for user reset locks

* fix: #11119, counter attempted flooding of user reset route

* test: fix password reset socket test to check for error now

* test: same user sending multiple reset emails

should work after waiting the correct amount of time

* lint: fixes

* chore: rename outdated `cleanTokensAndUids` method

* test: no need to create user for new test

Co-authored-by: Misty Release Bot <deploy@nodebb.org>
Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
2023-01-04 11:24:46 -05:00