Skip to content

Separate tokens for GitHub.com and enterprise domains #7735

Closed

Description

@mobilemind

Description

PR #7688 doesn't fix the export issue on my machine AND seems to have broken the ability to use separate tokens for GitHub.com and an enterprise GitHub domain-- adding or updating one personal token applies that token to all domains.

If you switch domains and paste in a new token, it replaces the token for both domains with the new one. For instance, to report this, I had to add my personal token for GitHub.com, which then also over-writes the token for the GitHub enterprise domain that I use

How to replicate the issue + URL

  1. Add a valid personal token for GitHub.com using Refined GitHub options.
  2. Switch to the Refined GitHub options for an Enterprise domain.
  3. Add a valid personal token for the Enterprise domain.
  4. Switch back to the Refined GitHub options for the GitHub.com domain
  5. The GitHub.com domain personal token is now invalid, and has been replaced with the Enterprise token.

If you then correct or update the GitHub.com domain personal token, it will over-write the Enterprise personal token and make that in valid.

Extension version

24.7.10

Browser(s) used

Safaria 17.6 (Mac)

Token ⚠️

  • I set a token in the options page. I understand that some features require a token to work.

Activity

  1. changed the title [-]PR #7688 seems to have broken separate tokens for GitHub.com and enterprise domains[/-] [+]Separate tokens for GitHub.com and enterprise domains[/+] on Aug 24, 2024
  2. fregante commented on Aug 24, 2024

    @fregante
    Member

    PR #7688 [...] seems to have broken the ability to use separate tokens

    You’re on Safari, your Refined GitHub version does not include that PR because it’s a month old.

    2. Switch to the Refined GitHub options for an Enterprise domain

    Are you using the domain picker that appears at the top of the options page?

    It works for me, I also use Safari 17.6 and Refined GitHub 24.7.10

    form

  3. added
    enterprise
    safari
    on Aug 24, 2024
  4. mobilemind commented on Aug 24, 2024

    @mobilemind
    Author

    I'll try to replicate this in about 4-5 hours when I can connect to the Enterprise domain again.

    Safari browsing Profiles, or interactions with other extensions might be involved. I was recently testing different extensions with profiles. I will try to isolate a configuration, workaround, or more specific trigger.

  5. fregante commented on Aug 24, 2024

    @fregante
    Member

    Other extensions don't have access to the options page, so as long as you see the expected token in the options (as shown in the gif above), then you're golden.

    Profiles get their own set of options, so if you use a dedicated profile for your GHE installation you still have to use the dropdown in that profile to set it up.

  6. mobilemind commented on Aug 26, 2024

    @mobilemind
    Author

    The .mp4 movie clip embedded shows the issue I experience on my machine, with default & Enterprise tokens always over-writing each other. The process shows the step & issue.

    1. Valid personal token for default (GitHub.com) and user @mobilemind
    2. Switch to Enterprise domain and it carries over the default token to Enterprise domain. This results in bad credentials for my Enterprise domain user @tom…
    3. Paste in personal token for Enterprise domain and it validates for @tom… user
    4. Switch to default domain (GitHub.com) and Enterprise domain personal token has over-written default domain token, so credentials are bad now for @mobilemind
    5. Update default domain credentials & switch to Enterprise domain, and default domain token overwrites Enterprise and we see bad credentials message for @tom…

    Safari Version 17.6 (19618.3.11.11.5)
    Refined GitHub 24.8.20

    GitHubRefinedIssue-compressed.mp4
  7. fregante commented on Aug 26, 2024

    @fregante
    Member

    What the.

    Have you been using Refined GitHub for a while? Is this a recent change?

    The most recent change that affected v24.7.10 is #7420, and anyway it would have broken it 40 days ago. V24.7.10 is also the first version with MV3 (#7473)

    Let’s try a few things:

    1. update to the latest version (24.8.25)
    2. close Safari altogether

    Any changes in behavior in the options page? If not, continue:

    1. Set GitHub.com
    2. Close and reopen options
    3. Switch domain
    4. Enter token for GHE
    5. DO NOT switch back, just close the tab

    Also on step 4 you can open the console on the options page and check what’s happening

  8. mobilemind commented on Aug 27, 2024

    @mobilemind
    Author

    I used Refined GitHub a fair amount earlier in the year, then started again in August. I'm not sure how recent this change is, and I easily went 30+ days without relying on GitHub Refined. So this could very well be a 40+ day old issue.

    I can't get "the latest version (24.8.25)" from the Mac App Store. Sorry.

    I'm replying with results from the procedure you described above, while using 24.8.20 again, but with console info.

    To my unsophisticated eyes, the console makes it look like current token is being written to the same object(s), whether configuring default/GitHub.com or GHE — both shows the same action_url. I've been setting the "Button link" to the top-level URL for GitHub.com or the GHE server at play, but the action_url seems stuck on https://github.com/.

    1. Set GitHub.com token (screen below after setting valid GitHub.com token, ghp_hcDd…)

      Step-3_after-setting-default-token
    1. Close and reopen options (console log after doing 3 & 4)

      Step-4_reopen-options
    1. Switch domain (after switching domain, but before entering any token for GHE)

      Step-5_after-switch-domains
    1. Enter token for GHE (after entering new valid token for GHE, ghp_dlpo…)

      Step-6_after-enter-GHE-token
  9. mobilemind commented on Aug 27, 2024

    @mobilemind
    Author

    Update: This seems to be an issue with Refined GitHub and Safari, but not Chrome.
    It works with Chrome, same computer & GHE server.
    Tested with Chrome 128.0.6613.85 (Mac) and Refined GitHub 24.8.20 (Chrome Web Store).

    That said, for various reasons, I need to use Safari for work and would like to help resolve this.

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

    bugenterprisesafari

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions