KindeK
Kinde3y ago
MaTTHD

kinde-flutter-sdk invalid session on every login attempt.

Hello! I have been trying to get the kinde flutter sdk to work, however for some reason after successfully logging in with the following code:
try {
      final sdk = KindeFlutterSDK.instance;

      final String? token = await sdk.login();
      final otherToken = await sdk.getToken();

      if (token != null) {
        print(token);

        final user = await sdk.getUserProfileV2();
        
        print(user);
      }
      else {
        print("Null token");
        throw Exception('Token is null');
      }
    
      notifyListeners();
    } catch (e) {
      print('Error on login: $e');
    }
  }


I just receive the following error: KindeError: Session expired or invalid and I am unsure why! This is my first time using Kinde so any help is greatly appreciated!
Was this page helpful?