MCPcopy Index your code
hub / github.com/parse-community/parse-server / _throwOnBadEmailConfig

Method _throwOnBadEmailConfig

src/Routers/UsersRouter.js:525–545  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

523 }
524
525 _throwOnBadEmailConfig(req) {
526 try {
527 Config.validateEmailConfiguration({
528 emailAdapter: req.config.userController.adapter,
529 appName: req.config.appName,
530 publicServerURL: req.config.publicServerURL || req.config._publicServerURL,
531 emailVerifyTokenValidityDuration: req.config.emailVerifyTokenValidityDuration,
532 emailVerifyTokenReuseIfValid: req.config.emailVerifyTokenReuseIfValid,
533 });
534 } catch (e) {
535 if (typeof e === 'string') {
536 // Maybe we need a Bad Configuration error, but the SDKs won't understand it. For now, Internal Server Error.
537 throw new Parse.Error(
538 Parse.Error.INTERNAL_SERVER_ERROR,
539 'An appName, publicServerURL, and emailAdapter are required for password reset and email verification functionality.'
540 );
541 } else {
542 throw e;
543 }
544 }
545 }
546
547 async handleResetRequest(req) {
548 this._throwOnBadEmailConfig(req);

Callers 2

handleResetRequestMethod · 0.95

Calls 1

Tested by

no test coverage detected