auth0 / auth0-flutter

Auth0 SDK for Flutter
https://pub.dev/documentation/auth0_flutter/latest/
Apache License 2.0
59 stars 39 forks source link

af: Fix email verified type #309

Closed itome closed 10 months ago

itome commented 11 months ago

email_verified field is sometimes String type instead of bool ("true" instead of true). I'm not professional on OIDC so I don't know whether it's always String or both String and bool is allowed.

πŸ“‹ Changes

Supoprt string type email_verified payload.

πŸ“Ž References

🎯 Testing

Widcket commented 11 months ago

Hi @itome, thanks for raising this.

Could you please expand on the circumstances where you found email_verified came as a string instead of a bool?

itome commented 11 months ago

@Widcket I found it with apple login. Google login and Twitter login works correct.

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (253209a) 96.08% compared to head (f35ff20) 95.80%. Report is 15 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #309 +/- ## ============================================ - Coverage 96.08% 95.80% -0.29% ============================================ Files 97 76 -21 Lines 1611 1121 -490 Branches 331 281 -50 ============================================ - Hits 1548 1074 -474 + Misses 49 46 -3 + Partials 14 1 -13 ``` | [Flag](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | Coverage Ξ” | | |---|---|---| | [auth0_flutter](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | `100.00% <100.00%> (ΓΈ)` | | | [auth0_flutter_android](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | `?` | | | [auth0_flutter_ios](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | `?` | | | [auth0_flutter_platform_interface](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | `87.03% <100.00%> (ΓΈ)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | Coverage Ξ” | | |---|---|---| | [...lib/src/web/extensions/user\_profile\_extension.dart](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-YXV0aDBfZmx1dHRlci9saWIvc3JjL3dlYi9leHRlbnNpb25zL3VzZXJfcHJvZmlsZV9leHRlbnNpb24uZGFydA==) | `100.00% <100.00%> (ΓΈ)` | | | [...lutter\_platform\_interface/lib/src/credentials.dart](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-YXV0aDBfZmx1dHRlcl9wbGF0Zm9ybV9pbnRlcmZhY2UvbGliL3NyYy9jcmVkZW50aWFscy5kYXJ0) | `100.00% <100.00%> (ΓΈ)` | | ... and [23 files with indirect coverage changes](https://app.codecov.io/gh/auth0/auth0-flutter/pull/309/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

itome commented 10 months ago

@Widcket Sorry to be late. I fixed the test.

Widcket commented 10 months ago

This is now out in v1.3.1.