Replies: 2 comments 13 replies
|
I'm getting something similar except users that have already signed up get put into a oauth loop saying "Current user already exists but is linked to another account." |
1 reply
|
The first time you login it matches on email and then saves the sub, which is used on future requests. Changing oauth providers without nulling out previously saved subs will lead to behavior like this. |
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The bug
Hi everyone,
I've been configuring Immich to use Azure B2C as its OAuth identity provider.
I've run into an issue which I don't think its intended as is concerning.
Essentially, after login, Immich attempts to load whatever profile has OAuth linked, even if the user is not the same, the email is not the same, etc.
The point that with a test account, it logged in into my administrator account. (different names, email addresses, etc).
Leaving me to believe that some checks are missing in the code, but I could be wrong.
Right now, after login, the callback receives the following attributes on top of the access token: sub (contains a guid that I'm not sure what refers to), email, given_name, family_name.
Login performed on a Web Browser at the computer, not the mobile app.
Is Immich expecting more attributes to be able to do the account matching?
The OS that Immich Server is running on
Ubuntu 24.04.1 LTS
Version of Immich Server
v1.123.0
Version of Immich Mobile App
1.125.5
Platform with the issue
Your docker-compose.yml content
Default docker compose from the documentation with Traefik added via labels.Your .env content
Reproduction steps
This requires a custom policy in Azure B2C due to the requirement of user_info.
The main fields that I think might be relevant are:
Relevant log output
Additional information
Please note that I had a different OAuth profiler previously and changed it via the configuration.
As such, the existing 2 users had OAuth linked from the previous setup, however, from the email alone it should not match, let alone other details such as the issuer.
Initially, when I logged in for the first time with Azure B2C, it went to my user B, where after doing Unlink OAuth, caused the login to load User A (the admin account).
Lastly, I have "Auto Register" set to Off and the user email that is coming from OAuth doesn't have a matching user in Immich.
All reactions