ajout de l'authentification SSO/A5L

This commit is contained in:
2026-03-27 11:14:56 +01:00
parent f07c6c646d
commit 9fee465f81
6 changed files with 95 additions and 1 deletions

20
public/callback.html Normal file
View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<body>
<script>
// Récupération du code dans l'URL
const urlParams = new URLSearchParams(window.location.search);
const code = urlParams.get('code');
if (code) {
// Ici, normalement, on échange le code contre un token via un fetch vers l'IdP
// Pour l'exemple, on simule la réussite :
localStorage.setItem('auth_token', 'session_active_' + btoa(code));
window.location.href = 'index.html';
} else {
document.body.innerHTML = "Erreur d'authentification. Redirection...";
setTimeout(() => window.location.href = 'index.html', 2000);
}
</script>
</body>
</html>