Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose error when storing renewed credentials fails #724

Merged
merged 2 commits into from
Jul 22, 2022

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Jul 22, 2022

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

📋 Changes

Currently, if the Credentials Manager fails to store newly obtained credentials (after a renewal), this failure is silent and is not exposed to the developer:

Screen Shot 2022-07-21 at 23 27 47

This can be a problem when Refresh Token Rotation is enabled, because the new refresh token will not be persisted and the next renewal will fail.

This PR exposes an error to the developer when the store operation (after a renewal) fails.

🎯 Testing

A couple of unit tests were added.

@Widcket Widcket requested a review from a team as a code owner July 22, 2022 02:34
@Widcket Widcket merged commit 8ea17cb into feature/can-renew Jul 22, 2022
@Widcket Widcket deleted the feature/expose-store-error branch July 22, 2022 11:03
Widcket added a commit that referenced this pull request Jul 22, 2022
* Add `canRenew()` to the CredentialsManager

* Expose error when storing renewed credentials fails (#724)
@Widcket Widcket mentioned this pull request Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants