-
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
Showing
10 changed files
with
215 additions
and
162 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
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 +1,11 @@ | ||
import { createClient } from "@supabase/supabase-js"; | ||
|
||
export const TOKEN_SECRET = "helloworld"; | ||
|
||
const SUPABASE_URL = "https://mjrrhdjdbsaystkbxvup.supabase.co"; | ||
|
||
// anon key는 어차피 클라가 알아야하니까 대충 때려박음 | ||
const SUPABASE_KEY = | ||
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im1qcnJoZGpkYnNheXN0a2J4dnVwIiwicm9sZSI6ImFub24iLCJpYXQiOjE2NjIzMDI2NzcsImV4cCI6MTk3Nzg3ODY3N30.eC3WDXnaIXy21bI8oGPaHTsLeE0jEmjk2qCDycB-AXc"; | ||
|
||
export const supabase = createClient(SUPABASE_URL, SUPABASE_KEY); |
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,13 +1,12 @@ | ||
import type { Session } from "@supabase/supabase-js"; | ||
import { createContext } from "react"; | ||
|
||
export interface AuthState { | ||
userId: number; | ||
authToken: string; | ||
session: Session | null; | ||
} | ||
|
||
const defaultValues: AuthState = { | ||
userId: 0, | ||
authToken: "", | ||
session: null, | ||
}; | ||
|
||
export const AuthContext = createContext(defaultValues); |
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
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
Oops, something went wrong.