Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: remember token when switching deployments#120

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fioan89 merged 4 commits intomainfromremember-token-when-switching-deployments
May 26, 2025

Conversation

fioan89
Copy link
Collaborator

If we log in on deployment 1, then log out and login to deployment 2 and then in the same session we try to log in back to deployment 1, the token is no longer valid. The plugin will associate with deployment 1 the token from the second deployment.

There is an overly complicated block of code inherited from Gateway plugin with multiple fallback sequences for both the deployment url and token from multiple sources (secrets store, data dir config, env, etc...). This fix simplifies the approach, we only store the url and the token in the secrets store, the token is always associated to a hostname. If there is no previous URL to remember (like the first time login) we default tohttps://dev.coder.com/ and empty token.

If we log in on deployment 1, then log out and login to deployment 2 and then in the same sessionwe try to log in back to deployment 1, the token is no longer valid. The plugin will associate withdeployment 1 the token from the second deployment.There is an overly complicated block of code inherited from Gateway plugin with multiple fallback sequencesfor both the deployment url and token from multiple sources (secrets store, data dir config, env, etc...).This fix simplifies the approach, we only store the url and the token in the secrets store, the token isalways associated to a hostname. If there is no previous URL to remember (like the first time login) wedefault tohttps://dev.coder.com/ and empty token.
@fioan89fioan89 requested review frommatifali andf0sselMay 22, 2025 22:25
On top of that the shared auth context was reset each time the TBX window was hided and then madevisible again. The auth context is now a singleton object shared between the wizard steps
@fioan89fioan89 marked this pull request as ready for reviewMay 23, 2025 21:42
@fioan89
Copy link
CollaboratorAuthor

@fioan89fioan89 requested a review frommatifaliMay 23, 2025 21:50
@fioan89fioan89 merged commit208225b intomainMay 26, 2025
5 checks passed
@fioan89fioan89 deleted the remember-token-when-switching-deployments branchMay 26, 2025 18:46
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@f0sself0sselAwaiting requested review from f0ssel

@matifalimatifaliAwaiting requested review from matifali

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@fioan89@matifali

[8]ページ先頭

©2009-2025 Movatter.jp