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

Method requestResetPassword

src/Routers/PagesRouter.js:150–177  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

148 }
149
150 requestResetPassword(req) {
151 const config = req.config;
152
153 if (!config) {
154 this.invalidRequest();
155 }
156
157 const { token: rawToken } = req.query;
158 const token = typeof rawToken === 'string' ? rawToken : undefined;
159
160 if (!token) {
161 return this.goToPage(req, pages.passwordResetLinkInvalid);
162 }
163
164 return config.userController.checkResetTokenValidity(token).then(
165 () => {
166 const params = {
167 [pageParams.token]: token,
168 [pageParams.appId]: config.applicationId,
169 [pageParams.appName]: config.appName,
170 };
171 return this.goToPage(req, pages.passwordReset, params);
172 },
173 () => {
174 return this.goToPage(req, pages.passwordResetLinkInvalid);
175 }
176 );
177 }
178
179 resetPassword(req) {
180 const config = req.config;

Callers 2

mountPagesRoutesMethod · 0.95
requestResetPasswordFunction · 0.80

Calls 3

invalidRequestMethod · 0.95
goToPageMethod · 0.95

Tested by 1

requestResetPasswordFunction · 0.64