Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credentials toMap loses data. The user property is not populated into the map #379

Closed
6 tasks done
MilesAdamson opened this issue Dec 11, 2023 · 2 comments
Closed
6 tasks done

Comments

@MilesAdamson
Copy link

Checklist

Description

The following makes the error type 'Null' is not a subtype of type 'Map<dynamic, dynamic>' in type cast. Because user is required in fromMap, but not provided in toMap. UserProfile does not have a toMap method

  1. get a Credentials object
  2. turn it into a map with toMap
  3. try to create a Credentials object from that map

Reproduction

final result = Credentials.fromMap(credentials.toMap());

Additional context

No response

auth0_flutter version

1.4.1

Flutter version

3.16.3

Platform

Android, iOS

Platform version(s)

all

@Widcket
Copy link
Collaborator

Widcket commented Dec 12, 2023

Hi @MilesAdamson, thanks for raising this.

The UserProfile type currently does not support map conversion. We're aware of this, but do not have short-term plans to add it ATM. We'd welcome a PR adding it.

@MilesAdamson
Copy link
Author

@Widcket I have a PR up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants