-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcb6cc0
commit f9a3481
Showing
12 changed files
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Techmino Hub - logging in...</title> | ||
</head> | ||
<body style="background:#000;color:#FFF"> | ||
<h1 id="txt"> | ||
<noscript>You cannot login with JavaScript disabled.</noscript> | ||
Loading... | ||
</h1> | ||
<script type="module"> | ||
import { SUPABASE } from '/js/db.js'; | ||
|
||
document.getElementById("txt").textContent = "Logging in..."; | ||
|
||
const session = SUPABASE.auth.getSession(); | ||
|
||
if(session) { | ||
document.getElementById("txt").textContent = "You are now logged in! Redirecting..."; | ||
} else { | ||
document.getElementById("txt").textContent = "Login failed. Redirecting..."; | ||
} | ||
window.location.href = "/index.html"; | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
body{background:black;color:white;margin:0} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import { createClient } from 'https://cdn.jsdelivr.net/npm/@supabase/supabase-js/+esm' | ||
const SUPABASE_URL = "https://fohgyexhzptaxjqrrrfd.supabase.co"; | ||
const SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZvaGd5ZXhoenB0YXhqcXJycmZkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDUwMjQxNTcsImV4cCI6MjAyMDYwMDE1N30.fa7XvwiBbWSe2MLIR6Wkh_OC95uV7UXxt7_25PlyAlc" | ||
const SUPABASE = createClient(SUPABASE_URL, SUPABASE_ANON_KEY); | ||
export const SUPABASE_URL = "https://fohgyexhzptaxjqrrrfd.supabase.co"; | ||
export const SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZvaGd5ZXhoenB0YXhqcXJycmZkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDUwMjQxNTcsImV4cCI6MjAyMDYwMDE1N30.fa7XvwiBbWSe2MLIR6Wkh_OC95uV7UXxt7_25PlyAlc" | ||
export const SUPABASE = createClient(SUPABASE_URL, SUPABASE_ANON_KEY); | ||
|
||
console.log(SUPABASE); { | ||
{ | ||
async function loginWithDiscord() { | ||
const { data, error } = await SUPABASE.auth.signInWithOAuth({ | ||
provider: "discord", | ||
|
||
options: { | ||
redirectTo: "https://techmino-hub.github.io/auth/discord.html" | ||
} | ||
}); | ||
console.log(data, error); | ||
} | ||
|
||
document.getElementById("button").addEventListener("click", loginWithDiscord); | ||
document.getElementById("login")?.addEventListener("click", loginWithDiscord); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters