earthaccess icon indicating copy to clipboard operation
earthaccess copied to clipboard

[BUG] Populate user_guide/authentication

Open andypbarrett opened this issue 1 year ago • 1 comments

Is this issue already tracked somewhere, or is this a new report?

  • [X] I've reviewed existing issues and couldn't find a duplicate for this problem.

Current Behavior

User Guide Authentication page needs populating

Expected Behavior

Contains complete documentation with examples for authenticating using earthaccess

Steps To Reproduce

See https://earthaccess.readthedocs.io/en/latest/user_guide/authenticate/

Environment

- OS:
- Python:

Additional Context

No response

andypbarrett avatar Oct 29 '24 18:10 andypbarrett

Methods to document as defined in Auth

  • login
    • strategy
    • persist
    • system
  • get_s3_credentials
  • get_fsspec_https_session - this maybe better in access
  • get_requests_https_session - this maybe better in access
  • get_edl_token

andypbarrett avatar Oct 29 '24 19:10 andypbarrett

@betolink we need to add documentation about refresh_tokens and get_session to the authentication user guide. Do you have any examples for how these would be used?

andypbarrett avatar Jan 21 '25 19:01 andypbarrett

refresh_tokens() regenerates EDL bearer tokens, I don't have a lot of examples but the explanatory text can mention that in case a user has not used their EDL account for a while (I think 2 months) the tokens will expire, if no token is available the function will generate at least one token. Only 2 tokens per user are allowed by the API.

get_session() just returns a Python requests session with the bearer token.

betolink avatar Jan 22 '25 02:01 betolink