Skip to content
This repository has been archived by the owner on Mar 21, 2023. It is now read-only.

Retrieve the PAT expiration date and show it to the user in the Auth Page #11

Open
davideroffo opened this issue Jul 27, 2022 · 3 comments

Comments

@davideroffo
Copy link
Contributor

Every time we are doing an HTTP request to the GitHub REST API, we should receive back a response header with the expiration date for the used token.
We would like to show the user, on the Auth Page, when the token will expire, so that the user knows when it's time to renew it.

Acceptance criteria:

  • add a message to the Auth Page with the expiration date for the token used
@simoneb
Copy link
Member

simoneb commented Jul 27, 2022

We can keep this an optional feature as users can choose the expiration when they create the token, and github notifies you when a token is about to expire. Let's prioritize other features and error handling so we can display a proper error if the token is invalid/expired

@lasmil lasmil self-assigned this Oct 13, 2022
@lasmil
Copy link
Contributor

lasmil commented Oct 13, 2022

Assigned to myself as it is related to:
#20

@lasmil
Copy link
Contributor

lasmil commented Oct 27, 2022

After some investigation we found that we can't read the github-authentication-token-expiration header.
The reason this is happening is because this header is not exposed via CORS:
image

To have access to this header, it needs to appear in the headers list (as seen in the screenshot).

We will revisit this at some point in the future though.

@lasmil lasmil removed their assignment Nov 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants