Skip to content

Commit

Permalink
fix: base64 encode GC private key (#1302)
Browse files Browse the repository at this point in the history
* fix: base64 encode GC private key
  • Loading branch information
vnugent authored Mar 6, 2025
1 parent 87f1b30 commit 4e2ab53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/media/storageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Storage, GetSignedUrlConfig } from '@google-cloud/storage'
const storage = new Storage({
credentials: {
type: 'service_account',
private_key: process.env.GC_BUCKET_PRIVATE_KEY ?? '',
private_key: Buffer.from(process.env.GC_BUCKET_PRIVATE_KEY ?? '', 'base64').toString('utf-8'),
client_email: process.env.GC_BUCKET_CLIENT_EMAIL ?? ''
}
})
Expand Down

0 comments on commit 4e2ab53

Please sign in to comment.