Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelgoto/02a59babe4f8d9ec5b70fae7b54a9534 to your computer and use it in GitHub Desktop.
Save samuelgoto/02a59babe4f8d9ec5b70fae7b54a9534 to your computer and use it in GitHub Desktop.
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