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

NASA Earthdata token expiry bug #1133

Closed
andreleblanc11 opened this issue Jul 24, 2024 · 0 comments · Fixed by #1142
Closed

NASA Earthdata token expiry bug #1133

andreleblanc11 opened this issue Jul 24, 2024 · 0 comments · Fixed by #1142
Labels
bug Something isn't working v3 issue deferred to or affects version 3

Comments

@andreleblanc11
Copy link
Member

The NASA Earthdata bearer token isn't auto-updating.

We think this is because the token expires on the day of the expiry at 23:59:59Z.

The current code doesn't account for the expiry date being after today's date.

if self._token_expires and today == self._token_expires:
logger.info(f"the token ending with ...{self._token[-5:]} expires today ({self._token_expires})")
self._token = None
self._token_expires = None
else:
logger.debug(f"token is not expired. today = {today}, token expires on {self._token_expires}")

Need to change == to >= on line 97 to account for this

@andreleblanc11 andreleblanc11 added bug Something isn't working v3 issue deferred to or affects version 3 labels Jul 24, 2024
petersilva added a commit that referenced this issue Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 issue deferred to or affects version 3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant