Skip to content

Commit

Permalink
fix: added base64 decode to GOOGLE_PRIVATE_KEY
Browse files Browse the repository at this point in the history
Refs: #301
  • Loading branch information
silvicir authored Aug 30, 2024
1 parent 1b3c34a commit f0084f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/shiny-rules-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"io-sign-backoffice-func": patch
---

Added base64 decode for GOOGLE_PRIVATE_KEY env var
2 changes: 1 addition & 1 deletion apps/io-sign-backoffice-func/src/infra/google/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ConfigFromEnvironment = z
.transform((e) => ({
credentials: {
type: "service_account",
private_key: e.GOOGLE_PRIVATE_KEY,
private_key: Buffer.from(e.GOOGLE_PRIVATE_KEY, "base64").toString(),
client_email: e.GOOGLE_CLIENT_EMAIL,
},
spreadsheetId: e.GOOGLE_SPREADSHEET_ID,
Expand Down

0 comments on commit f0084f8

Please sign in to comment.