Le nouveau flux reset (Edge Function mva-password-reset, deploye 2026-05-30)
envoie un lien ?token_hash=HASH&type=recovery au lieu de ?token=. La page-relais
lit desormais token_hash + type et construit le deep link
mvaglobalfret://reset-password?token_hash=...&type=... que l'app consomme via
verifyOtp({ token_hash, type }). Si token_hash est absent, on affiche un message
d'erreur (lien invalide) au lieu de tenter le redirect.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
82 lines
3.2 KiB
HTML
82 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<title>Réinitialisation du mot de passe — MVA Global Fret</title>
|
|
<link rel="icon" type="image/png" href="PNG MVA GLOBAL FRET.png">
|
|
<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.
|
|
(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)
|
|
);
|
|
}
|
|
})();
|
|
</script>
|
|
<style>
|
|
body {
|
|
font-family: system-ui, -apple-system, sans-serif;
|
|
text-align: center;
|
|
padding: 2rem;
|
|
color: #333;
|
|
max-width: 480px;
|
|
margin: 0 auto;
|
|
}
|
|
h1 { color: #2d3748; font-size: 1.5rem; }
|
|
p { line-height: 1.6; }
|
|
a.cta {
|
|
display: inline-block;
|
|
background: #c5a55a;
|
|
color: #fff;
|
|
padding: 0.75rem 1.5rem;
|
|
border-radius: 6px;
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
margin-top: 1rem;
|
|
}
|
|
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">
|
|
<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>
|
|
<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);
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|