Skip to content

[Bug] OAuth callback ignores the ?error param and leaves a stale login_redirect after failed logins #1055

@chronoai-shining

Description

@chronoai-shining

Summary

Found during fine-grained code-quality review (second pass) at commit 14fbf3e (develop). Severity: low — bug.

ornn-web/src/pages/OAuthCallbackPage.tsx:32-47,57-58 — OAuth servers signal denial via ?error=access_denied&error_description=… with no code; the page never reads the error param and shows the misleading "Missing authorization code". Additionally login_redirect is only cleared on success, so a failed login leaves a stale redirect that applies to an unrelated future login.

Suggested fix

Branch on searchParams.get("error") first (showing error_description when present) and clear login_redirect on the error path too.

Related to #1006 (this page's strings are also in the i18n batch).

Metadata

Metadata

Labels

auto:eligible/auto MAY pick this issue for autonomous work. Required to claim.size:SSmall: < ~1h, single file/concern. Size is informational.type:bugDefect: behavior diverges from intent/spec.webornn-web frontend SPA

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions