refactor: github oauth
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
<style>
|
||||
body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tip {
|
||||
color: #555;
|
||||
}
|
||||
.error {
|
||||
visibility: hidden;
|
||||
color: red;
|
||||
}
|
||||
body.error .tip {
|
||||
visibility: hidden;
|
||||
}
|
||||
body.error .error {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="tip">WebApp GitHub OAuth Callback Page</h1>
|
||||
<h1 class="error">Code not found</h1>
|
||||
<script>
|
||||
const code = new URLSearchParams(location.search).get("code");
|
||||
if (code) {
|
||||
location.href = `${location.origin}/?code=${code}#/cb/github/webapp`;
|
||||
} else {
|
||||
document.body.classList.add("error");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
<style>
|
||||
body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.tip {
|
||||
color: #555;
|
||||
}
|
||||
.error {
|
||||
visibility: hidden;
|
||||
color: red;
|
||||
}
|
||||
body.error .tip {
|
||||
visibility: hidden;
|
||||
}
|
||||
body.error .error {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="tip">Widget GitHub OAuth Callback Page</h1>
|
||||
<h1 class="error">Code not found</h1>
|
||||
<script>
|
||||
const code = new URLSearchParams(location.search).get("code");
|
||||
if (code) {
|
||||
location.href = `${location.origin}/?code=${code}#/cb/github/widget`;
|
||||
} else {
|
||||
document.body.classList.add("error");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user