-
Notifications
You must be signed in to change notification settings - Fork 666
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
Different accounts may use same keychain entry #5830
Comments
That's not possible, the client uses oauth2 always if the server supports it. Even if the account was configured with basic http auth before, it will then switch to oauth2 on the next connection. |
Related behavior for the cookies on log out/account removal: #5383 (comment) |
@ogoffart Then there's some other bug lurking there, because I set up a new oauth2 account. Restarted the client and one of the two accounts pointing to the same server was signed out for no apparent reason. I guessed that the http-account's persist() overwrote some oauth keychain data... |
Remember that this might be a quite exotic setup, so don't introduce too much complexity for this. |
Couldn't we simply use the id from the
Can be exotic yup, but if allowed (#5305) I think it should be done with unique account id's since otherwise it may have collateral effects for the people that use the client in that way (having the same account multiple times) 🤔 |
@guruz I think that if it's a supported feature we should care about the related bugs (but not with high priority since few people see it). If we don't want to support these setups altogether we should remove the ability to create multiple accounts for the same server in the first place. |
Just checking that here you mean some sort of "weird" setup where someone adds the same account on the same server multiple times. Having multiple different accounts set up on the client that are all on the same server works fine, and is a reasonable thing to do (well, I do it) |
@phil-davis Yes, thanks for the clarification. I meant several accounts pointing to the same user on the same server. |
This might actually be a problem for oauth where the refresh_token can only be used once. |
Upgraded to p2. |
What should happen (not tested, because the oauth2 app currently does not allow several connections) is that one of the account connects and the other re open the browser. Not too bad. |
but it will..
ack
Yes, we had agreed that this shall be possible because users are doing things we don't imagine (e.g. they sync the same account to both their HD and a USB drive) |
Tested with owncloud/oauth2#65 and everything works perfectly as we can re-use the refresh_token several time. |
Pointed out in owncloud/oauth2#70 since that should be solved in the future and we might need to adapt to get a deterministic behavior. |
Another issue with current implementation: after #5752 removing an account could have the collateral of login out the other one when the client is restarted. |
It's a bit painful due to migration, but I can take care of it. |
This requires a lot of migration code: the old entries need to be read, saved to the new locations and then deleted.
This requires a lot of migration code: the old entries need to be read, saved to the new locations and then deleted.
This requires a lot of migration code: the old entries need to be read, saved to the new locations and then deleted.
Tested with different upgrade and multiaccount scenarios and all of them ran perfectly smooth. 🎉 Closin' here 👍 Very nice! |
Currently the client saves and looks up keychain entries by user + server url. This leads to problems when there are several accounts with the same identifier.
Specifics:
An account should generate an additional unique identifier to disambiguate the different accounts. Care needs to be taken to make it backwards compatible.
The text was updated successfully, but these errors were encountered: