Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to two different orgs because I have the same username in both #1137

Open
kacrouse opened this issue Jan 16, 2025 · 2 comments
Open
Labels
bug Something isn't working

Comments

@kacrouse
Copy link

Describe the bug and steps to reproduce
My company's SSO matches users based on username. We have SSO setup in our full sandbox in addition to prod, meaning the username must be the same for a given user in each environment (I think this used to be not possible, but it is definitely possible now).

Jetstream will only allow me to have one of these environments at a time, I assume because username is used as the unique identifier. When I try to auth the second environment, the previous one I auth'd disappears.

Expected behavior
I can have both of these environments stored in Jetstream at the same time.

Browser and operating system:
Chrome, macOS

@kacrouse kacrouse added the bug Something isn't working label Jan 16, 2025
@paustint
Copy link
Contributor

@kacrouse - Jetstream uses orgId+userId as the unique key, and those should always be different.

After going through the authorization flow, Jetstream calls the userInfo endpoint to get your info (e.g. something like https://login.salesforce.com/id/00D6g000008KX1jEAG/0056g000004tCpaAAE) and from the response of that the unique id is constructed ${jetstreamConn.sessionInfo.organizationId}-${jetstreamConn.sessionInfo.userId}

And the org would only be replaced if this id were to be the same.

  1. Are you 100% sure the SSO process is not redirecting to the other org silently during the redirect process?
  2. Try using the "custom login URL" - as that is the only failsafe way to make sure you login to the right org
  3. Can you try logging in without SSO as shown in the screenshot to see if that works?

Image

@kacrouse
Copy link
Author

Oh interesting, thanks for confirming that!

I will look into those things you mentioned and report back.

In the meantime I have just changed my username in the sandbox to be different from the prod username, though obviously not ideal longterm since I can't use SSO with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants