Compare commits
No commits in common. "2a2ea2f5e405d082b136c541c608b25c1aa6017a" and "ee17b2b48c7479eeb227b25930715cdbbec2ab03" have entirely different histories.
2a2ea2f5e4
...
ee17b2b48c
@ -9,16 +9,11 @@
|
||||
<script>
|
||||
// Bridge mobile deep link MVA : redirect vers le custom scheme natif
|
||||
// mvaglobalfret://reset-password pour ouvrir le flow in-app de l'app Expo.
|
||||
// Le lien email porte token_hash + type (recovery) ; l'app fait verifyOtp.
|
||||
// Le token est un UUID custom émis par mva-api (Fastify), validé côté app.
|
||||
(function() {
|
||||
var params = new URLSearchParams(window.location.search);
|
||||
var tokenHash = params.get('token_hash');
|
||||
var type = params.get('type') || 'recovery';
|
||||
if (tokenHash) {
|
||||
window.location.replace(
|
||||
'mvaglobalfret://reset-password?token_hash=' +
|
||||
encodeURIComponent(tokenHash) + '&type=' + encodeURIComponent(type)
|
||||
);
|
||||
var token = new URLSearchParams(window.location.search).get('token');
|
||||
if (token) {
|
||||
window.location.replace('mvaglobalfret://reset-password?token=' + encodeURIComponent(token));
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
@ -45,37 +40,18 @@
|
||||
}
|
||||
a.cta:hover { background: #b3954a; }
|
||||
.hint { color: #666; font-size: 0.9rem; margin-top: 2rem; }
|
||||
.error { color: #b91c1c; font-size: 0.95rem; line-height: 1.6; margin-top: 1rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ouvrir l'app MVA Global Fret</h1>
|
||||
<p id="intro">Pour réinitialiser votre mot de passe, ouvrez le lien ci-dessous dans l'application MVA Global Fret installée sur votre téléphone.</p>
|
||||
<p id="link-wrap">
|
||||
<p>Pour réinitialiser votre mot de passe, ouvrez le lien ci-dessous dans l'application MVA Global Fret installée sur votre téléphone.</p>
|
||||
<p>
|
||||
<a id="manual-link" class="cta" href="#">Réinitialiser mon mot de passe</a>
|
||||
</p>
|
||||
<p id="hint" class="hint">Si rien ne se passe, vérifiez que l'application MVA Global Fret est bien installée sur votre appareil.</p>
|
||||
<p id="error" class="error" style="display:none;">Ce lien de réinitialisation est invalide ou incomplet. Veuillez relancer la procédure « Mot de passe oublié » depuis l'application MVA Global Fret.</p>
|
||||
<p class="hint">Si rien ne se passe, vérifiez que l'application MVA Global Fret est bien installée sur votre appareil.</p>
|
||||
<script>
|
||||
(function() {
|
||||
var params = new URLSearchParams(window.location.search);
|
||||
var tokenHash = params.get('token_hash');
|
||||
var type = params.get('type') || 'recovery';
|
||||
|
||||
if (!tokenHash) {
|
||||
// Lien invalide : pas de token_hash → on masque le bouton et on prévient.
|
||||
document.getElementById('intro').style.display = 'none';
|
||||
document.getElementById('link-wrap').style.display = 'none';
|
||||
document.getElementById('hint').style.display = 'none';
|
||||
document.getElementById('error').style.display = 'block';
|
||||
return;
|
||||
}
|
||||
|
||||
// Deep link vers l'app : l'app lit token_hash + type et fait verifyOtp.
|
||||
document.getElementById('manual-link').href =
|
||||
'mvaglobalfret://reset-password?token_hash=' +
|
||||
encodeURIComponent(tokenHash) + '&type=' + encodeURIComponent(type);
|
||||
})();
|
||||
var token = new URLSearchParams(window.location.search).get('token') || '';
|
||||
document.getElementById('manual-link').href = 'mvaglobalfret://reset-password?token=' + encodeURIComponent(token);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user