overleaf/services/web/test
Antoine Clausse e452f1df5b [web] Promisify LdapController (#18500)
* Promisify LdapController

* Update tests LdapControllerTests.js

* Promisify `AuthenticationController.finishLogin`

* Simplify null checks in LdapController

* Fix: don't use spread operator in module.exports

* Make `AuthenticationController.promises.finishLogin` a promise that resolves

* Fixup: `finishLogin` does not call `next` then the promise finishes, it calls it only on errors

* Use `Modules.promises.hooks.fire`

* Revert `processPassportLogin` callback style

* Update error handling: Use `OError.tag` instead of `logger.err`

* Fix unit tests: Rely on callbacks rather than promises

* Fix: Actually call `passport.authenticate` (!!)

* Update test: fixup `passport.authenticate` mocks

This would have caught the bugs that the previous commit is solving

* Remove `.then(() => next())` in `processPassportLogin`

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>

---------

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
GitOrigin-RevId: a7eab5f5289956aeb8f2418408958daef3511ab7
2024-06-06 08:04:23 +00:00
..
acceptance In PayPal collect invoices script: Update throw unsuccessful invoices collections (#18572) 2024-05-30 08:04:31 +00:00
frontend Remove Angular (#17534) 2024-06-06 08:04:09 +00:00
smoke Merge pull request #16353 from overleaf/em-typescript-in-web-backend 2024-01-04 09:03:43 +00:00
unit [web] Promisify LdapController (#18500) 2024-06-06 08:04:23 +00:00