glp-companion/lib/features/auth/presentation/controllers/dev_auth_bypass.dart

14 lines
655 B
Dart

import 'package:flutter_riverpod/flutter_riverpod.dart';
/// Development-only authentication bypass flag.
///
/// When `true`, the router's auth guard treats the session as authenticated,
/// letting reviewers exercise the app without a configured Supabase project
/// or a federated sign-in round trip.
///
/// Safety properties:
/// * The toggle button is only rendered in debug builds (`kDebugMode`), so
/// release/store builds never expose it.
/// * State is in-memory only: every cold start re-enables the guard, so a
/// bypassed session can never persist into a fresh launch.
final devAuthBypassProvider = StateProvider<bool>((ref) => false);