Repository navigation
feat(auth): SASL IRCV3BEARER + per-server OAuth2/OIDC sign-in #196
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
dbd6086
feat: SCRAM-SHA-256, TOTP 2FA + biometric (WebAuthn) login
ValwareIRC af2064b
feat: tic-tac-toe (compatible with KiwiIRC plugin)
ValwareIRC b6e6bd9
feat: surface tic-tac-toe button in the PM header action row
ValwareIRC 25f5b0d
2FA: confirm-before-remove, block removing last credential while enabled
ValwareIRC d82124b
Request draft/account-2fa CAP so the client merges it into server.cap…
ValwareIRC cca2abd
Move 2FA management into UserSettings → Account; raise 2FA modal z-in…
ValwareIRC b096e0b
Don't send spurious AUTHENTICATE + after SCRAM server-final
ValwareIRC 8fd71bb
feat(auth): SASL IRCV3BEARER + per-server OAuth2/OIDC sign-in
ValwareIRC 68140b4
feat(auth): bake OAuth config into the build for lock-mode deployments
ValwareIRC fe7e9e5
refactor(EditServerModal): tabbed left-sidebar layout
ValwareIRC 7b9034e
feat(auth): opaque-token (GitHub) + id_token (Gmail) OAuth paths
ValwareIRC 6223a7c
feat(auth): static /oauth/callback page
ValwareIRC 581dbfe
Merge main into feat/auth-modern
ValwareIRC b16a4d5
merge feat/auth-modern (deploy-only; not for push)
ValwareIRC a3863d4
feat(auth): smart 2FA step-up — IRCV3BEARER step-up + reject same-fac…
ValwareIRC 3af9830
Merge remote-tracking branch 'origin/main' into feat/oauth2-sasl
ValwareIRC 6779045
Fix cmd→command for 2FA NOTE projection
ValwareIRC 895db6e
Merge remote-tracking branch 'origin/main' into feat/oauth2-sasl
ValwareIRC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import type React from "react"; | ||
| import { useEffect, useState } from "react"; | ||
| import type { OAuthCallbackMessage } from "../lib/oauth"; | ||
|
|
||
| // Loaded at /oauth/callback inside the popup window the OAuth flow opened. | ||
| // Pulls `code` and `state` (or `error`) from the query string, sends them | ||
| // back to the opener via postMessage, then closes itself. | ||
| export const OAuthCallback: React.FC = () => { | ||
| const [message, setMessage] = useState("Completing sign-in..."); | ||
|
|
||
| useEffect(() => { | ||
| const params = new URLSearchParams(window.location.search); | ||
| const code = params.get("code") ?? undefined; | ||
| const state = params.get("state") ?? ""; | ||
| const error = params.get("error") ?? undefined; | ||
| const errorDescription = params.get("error_description") ?? undefined; | ||
|
|
||
| const payload: OAuthCallbackMessage = { | ||
| type: "obsidianirc:oauth-callback", | ||
| state, | ||
| code, | ||
| error, | ||
| errorDescription, | ||
| }; | ||
|
|
||
| if (window.opener && window.opener !== window) { | ||
| try { | ||
| window.opener.postMessage(payload, window.location.origin); | ||
| setMessage("Sign-in complete. You can close this window."); | ||
| setTimeout(() => { | ||
| try { | ||
| window.close(); | ||
| } catch {} | ||
| }, 300); | ||
| return; | ||
| } catch (err) { | ||
| setMessage( | ||
| `Could not return tokens to the main window: ${ | ||
| err instanceof Error ? err.message : String(err) | ||
| }`, | ||
| ); | ||
| return; | ||
| } | ||
| } | ||
| setMessage( | ||
| "OAuth callback was loaded outside its popup. You can close this tab.", | ||
| ); | ||
| }, []); | ||
|
|
||
| return ( | ||
| <div className="flex h-screen items-center justify-center bg-discord-dark-200 text-discord-text-normal"> | ||
| <div className="max-w-md p-6 text-center"> | ||
| <h1 className="text-xl font-bold mb-2">OAuth sign-in</h1> | ||
| <p className="text-discord-text-muted">{message}</p> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default OAuthCallback; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a language tag to these fenced config blocks.
markdownlintis still flagging both unlabeled fences. Adding a simple language likeconfortextwill clear the warning without changing the content.Also applies to: 95-99
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 71-71: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents