Skip to content

Commit

Permalink
Add .env file and update Google client ID
Browse files Browse the repository at this point in the history
  • Loading branch information
coji committed Jan 18, 2024
1 parent 3b2b12b commit d98fc37
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VITE_GOOGLE_CLIENT_ID=your_google_client_id

3 changes: 3 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: create .env file
run: |
echo "VITE_GOOGLE_CLIENT_ID=${{ secrets.VITE_GOOGLE_CLIENT_ID }}" >> .env
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: create .env file
run: |
echo "VITE_GOOGLE_CLIENT_ID=${{ secrets.VITE_GOOGLE_CLIENT_ID }}" >> .env
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
Expand Down
1 change: 0 additions & 1 deletion app/libs/google-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const createGoogleAuthenticator = ({
],
}: {
clientID: string
clientSecret: string
callbackURL: string
accessType?: 'online' | 'offline'
includeGrantedScopes?: boolean
Expand Down
4 changes: 1 addition & 3 deletions app/services/google-auth.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { createGoogleAuthenticator } from '~/libs/google-auth'

const googleAuthenticator = createGoogleAuthenticator({
clientID:
'555137498198-910lfdq60rjkclt8hbut5bhe0esfv4vn.apps.googleusercontent.com',
clientSecret: import.meta.env.GOOGLE_CLIENT_SECRET,
clientID: import.meta.env.VITE_GOOGLE_CLIENT_ID,
callbackURL: '/auth/google/callback',
})
const authenticate = googleAuthenticator.authenticate
Expand Down

0 comments on commit d98fc37

Please sign in to comment.