Skip to content

Commit

Permalink
test: test
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-ae committed Sep 5, 2024
1 parent 325532c commit aa57fa5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
22 changes: 13 additions & 9 deletions src/home/rendering/render-github-login-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ export async function checkSupabaseSession() {
return session;
}

function getRedirectTo () {
const currentUrl = window.location.href;
// function getRedirectTo () {
// const currentUrl = window.location.href;

// console.log("Current URL:", currentUrl); // Log the current URL

if (currentUrl.startsWith('https://work.ubq.fi')) {
return 'https://work.ubq.fi';
} else{
return currentUrl;
}
};
// if (currentUrl.startsWith('https://work.ubq.fi')) {
// console.log("Redirecting to:", 'https://work.ubq.fi');
// return 'https://work.ubq.fi';
// } else {
// console.log("Redirecting to current URL:", currentUrl);
// return currentUrl;
// }
// };

async function gitHubLoginButtonHandler(scopes = "public_repo read:org") {

Expand All @@ -45,7 +49,7 @@ async function gitHubLoginButtonHandler(scopes = "public_repo read:org") {
provider: "github",
options: {
scopes,
redirectTo: getRedirectTo(),
redirectTo: "work.ubq.fi",
},
});

Expand Down
1 change: 0 additions & 1 deletion static/style/inverted-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@
align-items: center;
display: inline-flex;
text-align: left;
margin: 0 16px;
}
#authenticated > * {
display: inline-flex;
Expand Down

0 comments on commit aa57fa5

Please sign in to comment.