Created
June 17, 2022 15:27
-
-
Save samuelgoto/02a59babe4f8d9ec5b70fae7b54a9534 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login.php | |
``` | |
<html> | |
try { | |
const credential = await navigator.credentials.store(new FederatedCredential({ | |
rp: "https://springer.com", | |
user: {name: "David", picture: "..."} | |
})); | |
// do stuff | |
window.location.href = "https://springer.com/?saml_resonse?" + ...; | |
} catch (e) { | |
alert("oops"); | |
} | |
</html> | |
``` | |
logout.php | |
``` | |
<html> | |
try { | |
FederatedCredential.logoutRps([{ | |
url: "https://springer.com/logout.php" | |
}]); | |
} catch (e) { | |
alert("oops"); | |
} | |
</html> | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment