overleaf/services
Domagoj Kriskovic af4b22fab5 Confirm email new routes (#15377)
* confirm email routes

* Style the email confirmation template (#15196)

* error handling

* prettier

* error message

* rename variables

* message codes change

* v1 redirect

* fix assigning to session

* rename rate limitter

* rate limitter per email

* add try/catch

* added stub

* prettier

* confirm email acceptance test

* confirm when created

* tests

* added rate limit tests

* new email text

* subscribe to newsletter

* beforeEach/afterEach test both variants

* move tests to OverleafAuthenticationTests

* Revert "move tests to OverleafAuthenticationTests"

This reverts commit 3c745382815da1594044a811882ba3daa24a7a3a.

* cacheflow reset after each

* remove test archive request

* use crypto for random code

* rate limit in userEmailsConfirmationHandler

* ratelimiter per type

* req.session.pendingUserRegistration

* spy in before/after each

* without deleteMany

* delete staffUser in afterEach

* stub response, format

* rate limiter outside userEmailConfirmationHandler

* mock ratelimitter

* fix subscribe promise

* add email to logger

* logger calls

* using tsscmp

* fix lint

* resendConfirmationCode rate limiter in router

* remove redirect

---------

Co-authored-by: Rebeka Dekany <50901361+rebekadekany@users.noreply.github.com>
GitOrigin-RevId: 786c477966cf2c5f6e28417fe486146ee5c10884
2023-11-02 08:52:48 +00:00
..
chat Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
clsi Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
contacts Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
docstore Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
document-updater Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
filestore Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
git-bridge Merge pull request #15241 from overleaf/em-gcp-opentelemetry 2023-10-19 08:02:52 +00:00
history-v1 Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
notifications Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
project-history Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
real-time Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
spelling Merge pull request #15506 from overleaf/jpa-node-18-18-2 2023-11-01 09:02:48 +00:00
web Confirm email new routes (#15377) 2023-11-02 08:52:48 +00:00