Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function createResetPasswordDemandEmail({ email, temporaryKey, locale = F
homeName: getPixWebsiteDomain(locale),
homeUrl: getPixWebsiteUrl(locale),
helpdeskUrl: getSupportUrl(locale),
resetUrl: getPixAppUrl(locale, { pathname: `/changer-mot-de-passe/${temporaryKey}` }),
resetUrl: getPixAppUrl(locale, { pathname: '/changer-mot-de-passe', hash: temporaryKey }),
clickOnTheButton: i18n.__('reset-password-demand-email.params.clickOnTheButton'),
contactUs: i18n.__('reset-password-demand-email.params.contactUs'),
doNotAnswer: i18n.__('reset-password-demand-email.params.doNotAnswer'),
Expand Down
2 changes: 1 addition & 1 deletion mon-pix/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Router.map(function () {
this.route('logout', { path: '/deconnexion' });
this.route('not-connected', { path: '/nonconnecte' });

this.route('reset-password', { path: '/changer-mot-de-passe/:temporary_key' });
this.route('reset-password', { path: '/changer-mot-de-passe' });
this.route('password-reset-demand', { path: '/mot-de-passe-oublie' });
this.route('update-expired-password', { path: '/mise-a-jour-mot-de-passe-expire' });

Expand Down
7 changes: 5 additions & 2 deletions mon-pix/app/routes/reset-password.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import Route from '@ember/routing/route';
import { service } from '@ember/service';
import get from 'lodash/get';
import ENV from 'mon-pix/config/environment';
import Location from 'mon-pix/utils/location';

export default class ResetPasswordRoute extends Route {
@service requestManager;
@service errors;
@service router;

async model(params) {
const passwordResetTemporaryKey = params.temporary_key;
async model() {
const { hash } = new URL(Location.getHref());
const passwordResetTemporaryKey = decodeURIComponent(hash.slice(1));

try {
await this.requestManager.request({
url: `${ENV.APP.API_HOST}/api/check-password-reset-demand`,
Expand Down
Loading