Teszt felhasználó elmentett munkamenetének törlése induláskor
This commit is contained in:
@@ -67,6 +67,16 @@ Future<void> main() async {
|
||||
url: dotenv.env['SUPABASE_URL']!,
|
||||
anonKey: dotenv.env['SUPABASE_ANON_KEY']!);
|
||||
|
||||
// Egyszeri tisztítás: a korábbi, kódba égetett teszt-fiókos
|
||||
// bejelentkezés munkamenete még mindig elmentve lehet a készüléken —
|
||||
// ezt itt felismerjük és kijelentkeztetjük, hogy helyette a valódi
|
||||
// Google-bejelentkezés kerülhessen érvénybe. Valódi felhasználót nem
|
||||
// érint, mert az ő e-mail-címük sosem egyezik ezzel.
|
||||
final _restoredUser = Supabase.instance.client.auth.currentUser;
|
||||
if (_restoredUser?.email == 'test.elek.1@email.hu') {
|
||||
await Supabase.instance.client.auth.signOut();
|
||||
}
|
||||
|
||||
final versionGate = await checkVersionGate();
|
||||
if (versionGate.blocked) {
|
||||
runApp(MaterialApp(
|
||||
|
||||
@@ -157,10 +157,10 @@ class MapViewController extends GetxController {
|
||||
|
||||
prefs = await SharedPreferences.getInstance();
|
||||
|
||||
authResponse = await Supabase.instance.client.auth
|
||||
.signInWithPassword(email: 'test.elek.1@email.hu', password: 'demo');
|
||||
session = authResponse.session;
|
||||
user = authResponse.user;
|
||||
// authResponse = await Supabase.instance.client.auth
|
||||
// .signInWithPassword(email: 'test.elek.1@email.hu', password: 'demo');
|
||||
// session = authResponse.session;
|
||||
// user = authResponse.user;
|
||||
|
||||
Supabase.instance.client
|
||||
.channel('public:TerepiSeged_Receiver')
|
||||
|
||||
@@ -162,10 +162,17 @@ class NavigationViewController extends GetxController {
|
||||
mapController = MapController();
|
||||
prefs = await SharedPreferences.getInstance();
|
||||
|
||||
authResponse = await Supabase.instance.client.auth
|
||||
.signInWithPassword(email: 'test.elek.1@email.hu', password: 'demo');
|
||||
session = authResponse.session;
|
||||
user = authResponse.user;
|
||||
// authResponse = await Supabase.instance.client.auth
|
||||
// .signInWithPassword(email: 'test.elek.1@email.hu', password: 'demo');
|
||||
// session = authResponse.session;
|
||||
// user = authResponse.user;
|
||||
|
||||
// A korábbi, kódba égetett teszt-bejelentkezés törölve — az app
|
||||
// mostantól a valódi Google-bejelentkezést (AuthService) használja.
|
||||
// Itt csak a JELENLEGI (ha van) munkamenetet olvassuk ki, nem
|
||||
// erőltetünk újat.
|
||||
session = Supabase.instance.client.auth.currentSession;
|
||||
user = Supabase.instance.client.auth.currentUser;
|
||||
|
||||
// riveGpsIconController = RiveUtils.getRiveController(Artboard(),
|
||||
// stateMachineName: "gps_Interactivity");
|
||||
|
||||
Reference in New Issue
Block a user