MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
270 stars 243 forks source link

Flutter Unable to load Dashboard after successful Authentication #354

Closed Idika-alph-atec-concept-limited closed 2 years ago

Idika-alph-atec-concept-limited commented 2 years ago

My app is able to pass user to Auth0 server for authentication and get a response (token) success, however it fails to navigate to Home page (but I get the token - when I print the token and its details). And gives error: "W/IconCustomizer(10033): can't load transform_config.xml"

However, when I rebuild the app it goes to Home page after authentication without issues.

Please advise @MaikuB

I/DpmTcmClient(10033): RegisterTcmMonitor from: $Proxy1 I/Timeline(10033): Timeline: Activity_launch_request time:231216272 D/DecorView: getWindowModeFromSystem windowmode is 1 D/DecorView(10033): createDecorCaptionView windowingMode:1 mWindowMode 1 isFullscreen: true W/m.alphatec.oat(10033): Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) W/m.alphatec.oat(10033): Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) I/Timeline(10033): Timeline: Activity_launch_request time:231216363 I/Timeline(10033): Timeline: Activity_launch_request time:231217808 D/DecorView: getWindowModeFromSystem windowmode is 1 D/DecorView(10033): createDecorCaptionView windowingMode:1 mWindowMode 1 isFullscreen: true W/IconCustomizer(10033): can't load transform_config.xml I/flutter (10033): {nickname: ndukweidika, name: ndukweidika@rocketmail.com, picture: https://s.gravatar.com/avatar/bc5fd20ce2864e9e1c27ac8ee4290105?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fnd.png, updated_at: 2022-07-11T08:31:04.642Z, email: ndukweidika@rocketmail.com, email_verified: false, iss: https://dev-t3oosaf7.eu.auth0.com/, sub: auth0|62cb29490ed7975b56f4d693, aud: B0UbBrHm2ly15JGVV6zmcLRFNrln8ZYq, iat: 1657552527, exp: 1657588527, nonce: 2drkHx_pe4Psw08gmqtyjA} E/flutter (10033): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: type 'Null' is not a subtype of type 'String' E/flutter (10033): #0 new Auth0IdToken.fromJson (package:oath/models/auth0_id_token.dart:87:35) E/flutter (10033): https://github.com/MaikuB/flutter_appauth/pull/1 AuthService.parseIdToken (package:oath/services/auth_services.dart:143:25) E/flutter (10033): https://github.com/MaikuB/flutter_appauth/issues/2 AuthService._setLocalVariables (package:oath/services/auth_services.dart:83:17) E/flutter (10033): https://github.com/MaikuB/flutter_appauth/issues/3 AuthService.login (package:oath/services/auth_services.dart:115:12)

MaikuB commented 2 years ago

You'll need to take a closer look at the exceptions you're getting. The error you highlighted isn't to do with what you're experiencing. You'll need to debug your app more thoroughly given you've missed the fact that the logs state an unhandled exception that you didn't pick up and to dig further into