Skip to content

Fix OIDC logins silently failing when switching accounts#882

Merged
dozro merged 2 commits into
SableClient:devfrom
770grappenmaker:fix-oidc-account-switcher
May 20, 2026
Merged

Fix OIDC logins silently failing when switching accounts#882
dozro merged 2 commits into
SableClient:devfrom
770grappenmaker:fix-oidc-account-switcher

Conversation

@770grappenmaker
Copy link
Copy Markdown
Contributor

@770grappenmaker 770grappenmaker commented May 19, 2026

Fix OIDC logins in the account switcher failing due to the router ignoring login attempts. Closes #40 and probably more related issues.

Description

The router only lets you visit /home or the like if addAccount is unset, but this did not account for loginToken. Now, if loginToken is set, you visit the /login/server route instead of being redirected to /home, allowing the account switcher to work as intended.

Fixes #40
Fixes #284

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (does not apply)
  • I have made corresponding changes to the documentation (does not apply)
  • My changes generate no new warnings

AI disclosure:

No AI assists.

…oring login attempts

The router only lets you visit `/home` or the like if `addAccount` is unset,
but this did not account for `loginToken`. Now, if `loginToken` is set,
you visit the `/login/server` route instead of being redirected to `/home`,
allowing the account switcher to work as intended.
@770grappenmaker 770grappenmaker requested review from 7w1 and hazre as code owners May 19, 2026 19:03
@770grappenmaker 770grappenmaker changed the title Fix OIDC logins in the account switcher failing Fix OIDC logins silently failing when switching accounts May 19, 2026
@770grappenmaker
Copy link
Copy Markdown
Contributor Author

Perhaps an additional check should be done whether this concerns the /login endpoint

@nushea
Copy link
Copy Markdown
Member

nushea commented May 19, 2026

Hi, thank you so much for your contribution, could you please also add a .md file in the .changeset folder so that, if merged it will attribute the fix to you?

the file should be of the form

(inside .changeset/fix-oidc-account-switcher.md )

---
default: patch
---

Fix Account Switching and Multiple Sign-ins

or the like

@dozro dozro self-assigned this May 20, 2026
Copy link
Copy Markdown
Member

@dozro dozro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, tested it, solves the issue apparently

tested with:

  1. matrix.org
  2. fairchat.eu

(signed in at the same time)

@dozro dozro added this pull request to the merge queue May 20, 2026
Merged via the queue into SableClient:dev with commit 1262994 May 20, 2026
12 checks passed
@770grappenmaker 770grappenmaker deleted the fix-oidc-account-switcher branch May 20, 2026 18:41
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.

Multi account sso (MAS) login does not work Trying to add an account kicks me out

4 participants