From a95296e1fc810d09e6b6638778fdd4016365809b Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 4 Jan 2026 16:20:57 +0100 Subject: [PATCH] fix: fall back to regular OIDC when silent auth fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When prompt=none fails with login_required (no Authentik session), automatically redirect to regular OIDC flow to show login UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- CHANGELOG.md | 5 +++++ lib/routing/app_router.dart | 7 +++++++ pubspec.yaml | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db2c586..4deb9a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.1.4] - 2026-01-04 + +### Fixed +- Silent OIDC fallback: when `prompt=none` fails with `login_required` (no Authentik session), automatically fall back to regular OIDC flow to show login UI + ## [1.1.3] - 2026-01-04 ### Changed diff --git a/lib/routing/app_router.dart b/lib/routing/app_router.dart index 252b6bb..3056114 100644 --- a/lib/routing/app_router.dart +++ b/lib/routing/app_router.dart @@ -137,6 +137,13 @@ class _OidcCallbackPageState extends ConsumerState<_OidcCallbackPage> { // Check for error from Authentik if (widget.error != null) { + // Silent OIDC (prompt=none) failed - no existing session + // Fall back to regular OIDC flow to show login UI + if (widget.error == 'login_required') { + ref.read(authProvider.notifier).signIn(); + return; + } + setState(() { _isProcessing = false; _error = widget.errorDescription ?? widget.error; diff --git a/pubspec.yaml b/pubspec.yaml index c0c8a49..aa8d107 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.3+1 +version: 1.1.4+1 environment: sdk: ^3.10.4