Skip to content

Commit

Permalink
fix auth
Browse files Browse the repository at this point in the history
  • Loading branch information
oezguercelebi committed Jan 15, 2025
1 parent db84743 commit bd82ef1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
5 changes: 1 addition & 4 deletions static/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
name: 'github',
repo: 'binary-builders/binary.builders',
branch: 'dev',
base_url: 'https://api.github.com',
auth_endpoint: 'oauth/authorize',
client_id: 'Ov23liRMIoF49EgraU0t'
auth_endpoint: 'auth'
},
load_config_file: false,
media_folder: "static/images",
public_folder: "/images",
collections: [
Expand Down
22 changes: 22 additions & 0 deletions static/auth/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>Authenticating...</title>
</head>
<body>
<script>
const params = new URLSearchParams(window.location.search);
const code = params.get('code');
if (code) {
window.opener.postMessage(
{
type: 'github-auth',
payload: code,
},
window.location.origin
);
window.close();
}
</script>
</body>
</html>

0 comments on commit bd82ef1

Please sign in to comment.