Skip to content

Commit 2bde0a3

Browse files
committed
put all the secrets in functions/.env and call echo separately
1 parent ffc11d1 commit 2bde0a3

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/firebase-deploy-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ jobs:
5050
- name: Create functions environment file
5151
working-directory: functions
5252
run: |
53-
echo "CLIENT_SECRET=${{ secrets.TEST_CLIENT_SECRET }}\nCLIENT_ID=${{ secrets.TEST_CLIENT_ID }}" > .env
53+
echo "CLIENT_SECRET=${{ secrets.TEST_CLIENT_SECRET }}" > .env
54+
echo "CLIENT_ID=${{ secrets.TEST_CLIENT_ID }}" >> .env
55+
echo "REDIRECT_URI=${{ secrets.TEST_REDIRECT_URI }}" >> .env
5456
- name: Install dependencies and build functions
5557
working-directory: functions
5658
run: |

functions/src/oauth2-callback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { db, auth } from "./app.js";
33

44
const clientId = process.env.CLIENT_ID as string;
55
const clientSecret = process.env.CLIENT_SECRET as string; // Remove NEXT_PUBLIC_ prefix for security
6-
const redirectUri = process.env.NEXT_PUBLIC_REDIRECT_URI as string;
6+
const redirectUri = process.env.REDIRECT_URI as string;
77

88

99
// Use Map to track processed codes with timestamp for cleanup

0 commit comments

Comments
 (0)