Skip to content

Instantly share code, notes, and snippets.

@jboxman
Last active October 1, 2018 04:42
Show Gist options
  • Select an option

  • Save jboxman/00a83c230ea6f5eac11341e158ac45b1 to your computer and use it in GitHub Desktop.

Select an option

Save jboxman/00a83c230ea6f5eac11341e158ac45b1 to your computer and use it in GitHub Desktop.
github-sso-auth-code-flow #4
<!doctype html>
<html lang="en">
<head>
<title>Login successful</title>
</head>
<body>
<h1>Success</h1>
<p>You are authenticated...</p>
</body>
<script>
document.body.onload = function() {
var injectedUser = <%- JSON.stringify(user) %>;
window.opener.postMessage(
{
payload: injectedUser,
status: 'success'
},
window.opener.location
);
};
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment