Skip to content

What to do when the token has expired? #5168

Closed

Description

@fregante

Originally posted by @Dentrax in #5160 (comment)

Are there any error messages logged to console when it happens?

Oh, just saw this on the logs: 🙈

The token seems to be incorrect or expired. Update it in the options.

How would we get notified once Refined GitHub token got expired? I think we can add a small icon that indicated this situation. Furthermore, we can add this case in the FAQ section to remind whether token is expired or not. Wdyt? ❤️

I'm wary of bothering users with popups and notices, so I'd probably treat an expired token the same way as a missing token: Just show a notice in the console and in the options page.

Now the question is: Are we showing "token is expired" in the options page?

@Dentrax what's in the options page? Were the icons all red?

Activity

  1. added
    meta
    on Dec 10, 2021
  2. fregante commented on Dec 10, 2021

    @fregante
    MemberAuthor

    I'd probably treat an expired token the same way as a missing token

    Rather, as an invalid token because a missing token can be determined synchronously but an invalid token needs an API call so it can only be determined after the call is made.

  3. cheap-glitch commented on Dec 10, 2021

    @cheap-glitch
    Contributor

    Are we showing "token is expired" in the options page?

    If I remember correctly, the text below the field becomes ":no_entry_sign: The token is invalid or expired" as soon as it becomes (or is made) invalid.

  4. Dentrax commented on Dec 11, 2021

    @Dentrax

    @Dentrax what's in the options page? Were the icons all red?

    I could not remember much, but probably the icons were red and there was a warning text as @.cheap-glitch said.

    Since checking the token whether it is expired or not in the Setings > Extensions > Refined GitHub > Preferences, we had better to move another place to make it more visible to users.

    What about turning this blue color to red? Or adding a warning icon left next to the notification icon. Wdyt?

    Screen Shot 2021-12-11 at 20 07 15

  5. cheap-glitch commented on Dec 11, 2021

    @cheap-glitch
    Contributor

    Since checking the token whether it is expired or not in the Setings > Extensions > Refined GitHub > Preferences, we had better to move another place to make it more visible to users.

    If you set your token to auto-expire after a certain time, GitHub will notify you in advance via mail anyway, right?

  6. Dentrax commented on Dec 11, 2021

    @Dentrax

    That's right. But it's easy to miss; probably that's how i missed. 🙈

  7. fregante commented on May 17, 2023

    @fregante
    MemberAuthor

    I think an expired token warrants some UI. The difference between a missing token and an expired one is that the user took an action and inputted a valid token at some point, so they want to make use of the token.

    How do we show this message without being too much in the way? Maybe we use showToast once every 4 hours at most. To hide the toast, the user can then just remove the token.

    This is particularly important now that fine-grained tokens have a mandatory expiration (up to 1 year)

  8. fregante commented on Jun 6, 2024

    @fregante
    MemberAuthor

    We're handling this now.

    • Active actions (e.g. restore-file) will show a popup with an error
    • The options page shows that the token is invalid
    • The "Report bug" page shows a banner telling the user to add a token
    • Soon token-less users won't be able to open issues here: Mark more clearly that the token is "required" #7231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedmetaunder discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions