Store OIDC code_verifier and state in sessionStorage instead of static memory variables. This fixes the "No code verifier" error that occurred after Authentik redirect because the Flutter app restarts and loses in-memory state. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
1008 B
Dart
33 lines
1008 B
Dart
/// Stub for non-web platforms.
|
|
library;
|
|
|
|
/// Redirect to a URL (no-op on non-web).
|
|
void redirectTo(String url) {
|
|
throw UnsupportedError('redirectTo is only supported on web');
|
|
}
|
|
|
|
/// Get current URL (no-op on non-web).
|
|
String getCurrentUrl() {
|
|
throw UnsupportedError('getCurrentUrl is only supported on web');
|
|
}
|
|
|
|
/// Replace current URL without navigation (no-op on non-web).
|
|
void replaceUrl(String url) {
|
|
throw UnsupportedError('replaceUrl is only supported on web');
|
|
}
|
|
|
|
/// Store a value in sessionStorage (no-op on non-web).
|
|
void setSessionStorage(String key, String value) {
|
|
throw UnsupportedError('setSessionStorage is only supported on web');
|
|
}
|
|
|
|
/// Get a value from sessionStorage (no-op on non-web).
|
|
String? getSessionStorage(String key) {
|
|
throw UnsupportedError('getSessionStorage is only supported on web');
|
|
}
|
|
|
|
/// Remove a value from sessionStorage (no-op on non-web).
|
|
void removeSessionStorage(String key) {
|
|
throw UnsupportedError('removeSessionStorage is only supported on web');
|
|
}
|