Skip to content

Commit

Permalink
fix: use correct audience for auth
Browse files Browse the repository at this point in the history
  • Loading branch information
anichrelay-bloom committed Nov 21, 2024
1 parent 9fc7573 commit 2a11ceb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/fetch_auth_token.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,16 @@ fetch_auth_token <- function(url = set_token_url("dev"), client_id = getOption('
client_secret <- readline(prompt = "Enter your client_secret: ")
}

auth_audience <- "dev-api"
if (tolower(audience) == "prod") {
auth_audience <- "api.bloomcredit.io"
}

# construct API call ------------------------------------------------------
body <- list(
client_id = client_id,
client_secret = client_secret,
audience = "dev-api",
audience = auth_audience,
scope = "data-access:all",
grant_type = "client_credentials"
)
Expand Down

0 comments on commit 2a11ceb

Please sign in to comment.