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

fix(oauth2): ensure refresh token exists before using expired credential #349

Merged
merged 2 commits into from
Mar 29, 2023

Conversation

webmakersteve
Copy link
Contributor

We ran into an issue using an identity provider which did not issue refresh tokens.

Currently the command line tool will fail to authenticate with OAuth2 if using an expired access token and the refresh token is not set. This PR adjusts it to clear the cached credentials if it is expired and there is no refresh token set. The tool will then run the auth routine from the beginning, allowing you to re-log in rather than requiring you edit the spin config file to move forward.

@webmakersteve webmakersteve changed the title Check the refresh token before using cached credential fix(oauth2): ensure refresh token exists before using expired credential Jan 10, 2023
@spinnakerbot
Copy link

The following commits need their title changed:

  • 99a451f: Check the refresh token before using cached credential

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

@Chinikins
Copy link
Contributor

Chinikins commented Jan 19, 2023

thanks for adding this, it was badly needed for awhile 🙌

@webmakersteve
Copy link
Contributor Author

No problem! Already using the binary built off of this commit locally so I could get around the issue myself! :)

@webmakersteve
Copy link
Contributor Author

How do we get this merged into the repo @Chinikins ?

@Chinikins Chinikins merged commit a3839e8 into spinnaker:master Mar 29, 2023
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.

3 participants