Update: 2026-07-26 02:51:53
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jwt_decoder/jwt_decoder.dart';
|
||||
@@ -185,7 +186,7 @@ class OtpHelper extends GetxController {
|
||||
await box.write(BoxName.phoneVerified, true);
|
||||
await box.write('admin_password', password);
|
||||
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
|
||||
try {
|
||||
FirebaseMessaging.instance.subscribeToTopic('admin_alerts');
|
||||
} catch (e) {
|
||||
@@ -247,7 +248,7 @@ class OtpHelper extends GetxController {
|
||||
String token = r(rawJwt.toString()).split(AppInformation.addd)[0];
|
||||
if (!JwtDecoder.isExpired(token)) {
|
||||
Log.print('Valid JWT found, skipping login.php (no OTP needed)');
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
|
||||
try {
|
||||
FirebaseMessaging.instance.subscribeToTopic('admin_alerts');
|
||||
} catch (e) {
|
||||
@@ -291,7 +292,7 @@ class OtpHelper extends GetxController {
|
||||
} else if (response['jwt'] != null) {
|
||||
box.write(BoxName.jwt, c(response['jwt']));
|
||||
}
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
if (!kIsWeb && (Platform.isAndroid || Platform.isIOS)) {
|
||||
try {
|
||||
FirebaseMessaging.instance.subscribeToTopic('admin_alerts');
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user