Skip to content

fix: strip padding from access tokens if present#138

Merged
gcf-merge-on-green[bot] merged 5 commits into
mainfrom
strip-auth-token
Jul 28, 2021
Merged

fix: strip padding from access tokens if present#138
gcf-merge-on-green[bot] merged 5 commits into
mainfrom
strip-auth-token

Conversation

@shubha-rajan

@shubha-rajan shubha-rajan commented Jul 28, 2021

Copy link
Copy Markdown
Contributor

Strips trailing . characters from access tokens
fixes #137

@google-cla google-cla Bot added the cla: yes label Jul 28, 2021
request = google.auth.transport.requests.Request()
credentials.refresh(request)

stripped_token = credentials.token.rstrip(".")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here: a comment or something to remind us to remove this? Perhaps an issue to remove this once we fix it?

@shubha-rajan shubha-rajan added the automerge Merge the pull request once unit tests and other checks pass. label Jul 28, 2021
@gcf-merge-on-green gcf-merge-on-green Bot merged commit 1bc2ee4 into main Jul 28, 2021
@gcf-merge-on-green gcf-merge-on-green Bot deleted the strip-auth-token branch July 28, 2021 22:52
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Postgres IAM Authentication is flaky due to OAuth2 token inconsistency

3 participants