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

Fix .cryptkey Issue When Switching Between SSO and Non-SSO Accounts #1750

Closed

Conversation

avinash-0007
Copy link

Description:
This PR addresses an issue related to the .cryptkey file that causes errors when switching accounts after using both Single Sign-On (SSO) and Non-SSO login methods. The problem arises when a .cryptkey file is created during SSO login, which leads to errors when trying to switch accounts after logging in without SSO.

Steps to Reproduce:

  1. Register a new account.
  2. Log in using SSO and add an additional account via SSO. This creates a .cryptkey file in the path: storage/domain/user/.cryptkey.
  3. Switch between the accounts — it works as expected.
  4. Log out, then log in without SSO.
  5. Attempt to switch accounts again — this results in an error, and the following error is logged: GitHub Issue #1746.

Fix:
This PR introduces logic that handles the .cryptkey file properly when switching between SSO and Non-SSO login methods. Specifically, it ensures that the .cryptkey file is appropriately managed when logging in without SSO to prevent conflicts and errors during account switching.

Impact:
Users will now be able to switch between accounts smoothly without encountering errors, regardless of whether they log in with SSO or Non-SSO.

Issue Reference:
Resolves Issue #1746.

@the-djmaze the-djmaze added bug Something isn't working enhancement New feature or request Nextcloud extensions (plugin) labels Sep 16, 2024
@the-djmaze
Copy link
Owner

I can't merge this.
You've modified the core and then SnappyMail as standalone will fail.

@the-djmaze
Copy link
Owner

Fix should be something like this: 61e7c00

@the-djmaze the-djmaze closed this Sep 16, 2024
@avinash-0007
Copy link
Author

@the-djmaze Your fix is not really working. Having same error.

@avinash-0007
Copy link
Author

avinash-0007 commented Sep 16, 2024

@the-djmaze Also with my fix- snappymail alone will not fail.Reason if oidc app is not installed else code will be executed.and in your fix i really not understand how crypt error will not occur if user login in from non sso login page?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request extensions (plugin) Nextcloud
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.cryptkey Error During Non-SSO Account Switching after SSO Login or vice-versa
3 participants