-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add helper_parties and helper_party_network tables * add helper_party_api_keys table * add development api keys to .env.development * hashed_api_key should be non null * add modified_at and modified_reason to api keys
- Loading branch information
1 parent
f2f9be8
commit 46142c8
Showing
4 changed files
with
65 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
# DO NOT ADD SECRETS TO THIS FILE. This is a good place for defaults. | ||
# If you want to add secrets use `.env.development.local` instead. | ||
|
||
# local dev API keys | ||
HELPER_PARTY_1_API_KEY="f9c1cced33c932da94d520682d30b1a558711865d32634008488abf38d6f75a0" | ||
HELPER_PARTY_2_API_KEY="d64fd1cc084e2633d8e0719cb4691e81b1961949bc2aadecee14fdf53bd6f139" | ||
HELPER_PARTY_3_API_KEY="46198655cdac1d67e3e6aaf905c9d6702c899c607c2baedf353fc3106ec92929" | ||
|
||
# for local dev, we turn off auth, unless specifically working on auth | ||
BYPASS_AUTH=true | ||
DUMMY_EMAIL="[email protected]" | ||
|
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
14 changes: 14 additions & 0 deletions
14
server/supabase/migrations/20240609010604_helper_party_api_keys.sql
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,14 @@ | ||
create table | ||
helper_party_api_keys ( | ||
uuid uuid default gen_random_uuid() primary key, | ||
helper_party_uuid uuid references helper_parties not null, | ||
hashed_api_key text not null, | ||
created_at timestamp default current_timestamp not null, | ||
expires_at timestamp default current_timestamp + interval '1 year' not null, | ||
modified_at timestamp default null, | ||
modified_reason text default null | ||
); | ||
|
||
alter table helper_party_api_keys enable row level security; | ||
|
||
-- do not add any authenticated access to api_keys, require service_role and handle in application |
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