Skip to content

feat(auth): select login org by id#71

Open
ZanzyTHEbar wants to merge 1 commit intofosrl:devfrom
ZanzyTHEbar:feat/auth-login-org-id
Open

feat(auth): select login org by id#71
ZanzyTHEbar wants to merge 1 commit intofosrl:devfrom
ZanzyTHEbar:feat/auth-login-org-id

Conversation

@ZanzyTHEbar
Copy link
Copy Markdown

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

Adds an --org-id flag to pangolin login so users can select an organization explicitly during login.

Also validates a reused stored organization before saving the refreshed login session. If the stored org no longer belongs to the authenticated user, login falls back to the existing organization selector instead of silently keeping a stale org ID.

How to test?

go test ./cmd/auth/login
git diff --check

Manual:

pangolin login https://example.com --org-id <org-id>

Avoid reusing stale stored org IDs when login creates a new session for the authenticated user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant