Skip to content

Commit bc3c9ba

Browse files
committed
fixed incorrect endpoint for password reset and email verification
1 parent 093af98 commit bc3c9ba

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ export class Config {
451451
}
452452

453453
get requestResetPasswordURL() {
454-
return `${this.publicServerURL}/apps/${this.applicationId}/request_password_reset`;
454+
return `${this.publicServerURL}/${this.pagesEndpoint}/${this.applicationId}/request_password_reset`;
455455
}
456456

457457
get passwordResetSuccessURL() {
@@ -466,7 +466,15 @@ export class Config {
466466
}
467467

468468
get verifyEmailURL() {
469-
return `${this.publicServerURL}/apps/${this.applicationId}/verify_email`;
469+
return `${this.publicServerURL}/${this.pagesEndpoint}/${this.applicationId}/verify_email`;
470+
}
471+
472+
// TODO: Remove this function once PagesRouter replaces the PublicAPIRouter;
473+
// the (default) endpoint has to be defined in PagesRouter only.
474+
get pagesEndpoint() {
475+
return this.pages && this.pages.enableRouter && this.pages.pagesEndpoint
476+
? this.pages.pagesEndpoint
477+
: 'apps';
470478
}
471479
}
472480

0 commit comments

Comments
 (0)