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
ProfessorVarox pushed a commit to ProfessorVarox/sable that referenced this pull request May 22, 2026
> [!IMPORTANT]
> Merging this PR will create a new release.

## Features

* Add support for misskey-flavored markdown color definitions. E.g.
`$[fg.color=f00 bg.color=00ff00 red on green]`.
([SableClient#860](<SableClient#860>) by @7w1)
* Add per Space setting for when to show room icons in sidebar
([SableClient#851](<SableClient#851>) by @nushea)
* Add toggle to list all rooms inside of the home sidebar.
([SableClient#866](<SableClient#866>) by @nushea)

### Change Image Viewer to feel more natural to use.
([SableClient#686](<SableClient#686>) by @7w1,
@nushea, @Septicity)

- Fixed zoom gestures generally not working on mobile.
- Changed the % number in the top right to reflect the zoom of the
original image as opposed to the change from it fitting the container.
- Made the zoom pill allow entering custom values.
- Added a button that zooms you to the original size of the image, and a
button to return to the size that fills the container.
- Added a pixelated image scaling setting: choose Both, Chat, Image
viewer (default), or Neither for crisp nearest-neighbor rendering.
- Transitions are now disabled for manual panning to improve
responsiveness.

## Fixes

* Fixed starting lists at arbitrary numbers and list markers extending
off screen with long numbers.
([SableClient#860](<SableClient#860>) by @7w1)
* Fix single new lines after block quotes being block-quoted.
([SableClient#860](<SableClient#860>) by @7w1)
* Fix emojis not rendering in reply chips.
([SableClient#860](<SableClient#860>) by @7w1)
* Hardened html parsing in standard input box, should no longer randomly
delete text in arrow brackets (unless valid, properly closed, legal
html). ([SableClient#860](<SableClient#860>) by @7w1)
* Fixed the message loading spinner flickering instead of continuing
during large pagination chunks.
([SableClient#895](<SableClient#895>) by @7w1)
* Fix matrix.to links getting arrow brackets inserted when editing
messages. ([SableClient#860](<SableClient#860>) by
@7w1)
* Fix mentions breaking after editing messages with mentions.
([SableClient#860](<SableClient#860>) by @7w1)
* Fix account switching and logging in with multiple (SSO) accounts
silently failing
([SableClient#882](<SableClient#882>) by
@770grappenmaker)
* Removed the arbitrary bio limit from the bio editor.
([SableClient#863](<SableClient#863>) by @7w1)
* Remove target and rel attributes from outgoing html links.
([SableClient#891](<SableClient#891>) by @7w1)
* Fix tablet layouts having the sidebar fill up the screen.
([SableClient#864](<SableClient#864>) by @7w1)
* Add support for stable mutual rooms endpoint, manually ported from
[this
commit](cinnyapp/cinny@bef2672)
by ajbura upstream.
([SableClient#852](<SableClient#852>) by @7w1)

## Documentation

* Docker build tags have been updated: `latest` now tracks the latest
versioned release and `dev` now tracks the dev branch.
([SableClient#892](<SableClient#892>) by @7w1)
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