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

[BUG] Empty .jwks file causes sign-in errors #582

Open
aristizabal95 opened this issue Apr 17, 2024 · 0 comments · May be fixed by #611
Open

[BUG] Empty .jwks file causes sign-in errors #582

aristizabal95 opened this issue Apr 17, 2024 · 0 comments · May be fixed by #611
Assignees
Labels
component: client issues regarding the CLI project: Core type: bug Something isn't working

Comments

@aristizabal95
Copy link
Contributor

Describe the bug
In some strange edge cases, the .jwks file that resides in ~/.medperf_config/.tokens can end up empty. When that happens, Authentication fails, as medperf tries to read this file as a JSON object and can't figure out how to parse empty files.

To Reproduce

  1. Create an empty .jwks file in ~/.medperf_config/.tokens. Rename the previos one if needed
  2. Sign out of medperf.
  3. Try to sign back in. A JSONDecodeError will be raised.

Expected behavior
While the expected behavior should be to completely avoid generating empty .jwks file, a good additional behavior is to try to read the file and if it fails remove the corrupted one an regenerate it.

@aristizabal95 aristizabal95 added type: bug Something isn't working component: client issues regarding the CLI project: Core labels Apr 17, 2024
@aristizabal95 aristizabal95 self-assigned this Jun 17, 2024
@aristizabal95 aristizabal95 linked a pull request Aug 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: client issues regarding the CLI project: Core type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant