diff --git a/auth0_flutter_platform_interface/lib/src/credentials.dart b/auth0_flutter_platform_interface/lib/src/credentials.dart index c122a8dc..156bd870 100644 --- a/auth0_flutter_platform_interface/lib/src/credentials.dart +++ b/auth0_flutter_platform_interface/lib/src/credentials.dart @@ -58,21 +58,17 @@ class Credentials { required this.tokenType, }); - factory Credentials.fromMap(final Map result) { - print("Credentials::fromMap result.expiresAt ${result['expiresAt']}"); - print( - "Credentials::fromMap result.expiresAt DateTime::parse().toUtc() ${DateTime.parse(result['expiresAt'] as String).toUtc()}"); - return Credentials( - idToken: result['idToken'] as String, - accessToken: result['accessToken'] as String, - refreshToken: result['refreshToken'] as String?, - expiresAt: DateTime.parse(result['expiresAt'] as String).toUtc(), - scopes: Set.from(result['scopes'] as List), - user: UserProfile.fromMap(Map.from( - result['userProfile'] as Map)), - tokenType: result['tokenType'] as String, - ); - } + factory Credentials.fromMap(final Map result) => + Credentials( + idToken: result['idToken'] as String, + accessToken: result['accessToken'] as String, + refreshToken: result['refreshToken'] as String?, + expiresAt: DateTime.parse(result['expiresAt'] as String).toUtc(), + scopes: Set.from(result['scopes'] as List), + user: UserProfile.fromMap(Map.from( + result['userProfile'] as Map)), + tokenType: result['tokenType'] as String, + ); Map toMap() => { 'idToken': idToken,