Skip to content

Instantly share code, notes, and snippets.

@slashtechno
Last active September 18, 2022 17:01
Show Gist options
  • Save slashtechno/ed490f96fbabbf855da6110385bb82d4 to your computer and use it in GitHub Desktop.
Save slashtechno/ed490f96fbabbf855da6110385bb82d4 to your computer and use it in GitHub Desktop.
HTML meant to be set as a redirect URI for OAuth2 in order to display the authorization code

OAuth Code Viewer

A simple website to extract the code from an OAuth2 callback.
If state exists, output the URL instead

<!DOCTYPE HTML>
<html>
<head>
<title> OAuth Code Viewer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="main.js"></script>
<link rel="stylesheet" href="main.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Stick+No+Bills&display=swap" rel="stylesheet">
</head>
<body>
<center>
<h6>Please input the following into the app</h3>
<hr>
<p id="code">Loading code...</p>
<br>
<button id="copy">Copy code to clipboard</button>
<p id="copyNotice" class="fade">Text copied!</p>
</center>
</html>
This file has been truncated, but you can view the full file.
html{
font-family: 'Share Tech Mono', monospace;
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment