Skip to content

Commit

Permalink
auto refresh iam token
Browse files Browse the repository at this point in the history
  • Loading branch information
Logikgate committed Nov 15, 2024
1 parent 77f2288 commit f17ef80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scribe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface ComponentSchema {
}

const dbConnectionConfig = async () => {
let pass = argv.dbPass
let pass: string | (() => Promise<string>) = argv.dbPass
let ssl: any = argv.useSSL
if (argv.useIamConnection) {
try {
Expand All @@ -102,7 +102,7 @@ const dbConnectionConfig = async () => {
username: argv.dbUser
})

pass = await signer.getAuthToken()
pass = () => signer.getAuthToken()
// NOTE: https://github.com/brianc/node-postgres/issues/1843
// NOTE: https://github.com/brianc/node-postgres/issues/2009
ssl = {
Expand Down

0 comments on commit f17ef80

Please sign in to comment.