Web authentication now uses OIDC Authorization Code flow with PKCE instead of NPM forward auth. Added callback route and web utilities. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
439 B
Dart
20 lines
439 B
Dart
/// Web-specific utilities for browser operations.
|
|
library;
|
|
|
|
import 'package:web/web.dart' as web;
|
|
|
|
/// Redirect the browser to a URL.
|
|
void redirectTo(String url) {
|
|
web.window.location.href = url;
|
|
}
|
|
|
|
/// Get the current browser URL.
|
|
String getCurrentUrl() {
|
|
return web.window.location.href;
|
|
}
|
|
|
|
/// Replace the current URL in history without navigation.
|
|
void replaceUrl(String url) {
|
|
web.window.history.replaceState(null, '', url);
|
|
}
|