auth0 / auth0-flutter

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

af: Use Application Context for Credentials Manager #289

Closed poovamraj closed 1 year ago

poovamraj commented 1 year ago

📋 Changes

We are using applicationContext to fetch the credentials instead of Activity which is not required and could cause issues when credentials are fetched from outside an activity

📎 References

https://github.com/auth0/auth0-flutter/issues/233

🎯 Testing

We have updated the existing Unit Tests and added check that proper context is set.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 80.00% and project coverage change: -0.06 :warning:

Comparison is base (d72bf76) 96.14% compared to head (59cbf46) 96.08%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #289 +/- ## ============================================ - Coverage 96.14% 96.08% -0.06% - Complexity 85 86 +1 ============================================ Files 97 97 Lines 1609 1611 +2 Branches 331 331 ============================================ + Hits 1547 1548 +1 Misses 49 49 - Partials 13 14 +1 ``` | Flag | Coverage Δ | | |---|---|---| | auth0_flutter | `100.00% <ø> (ø)` | | | auth0_flutter_android | `96.55% <80.00%> (-0.19%)` | :arrow_down: | | auth0_flutter_ios | `99.84% <ø> (ø)` | | | auth0_flutter_platform_interface | `87.03% <ø> (ø)` | | 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. | [Impacted Files](https://app.codecov.io/gh/auth0/auth0-flutter/pull/289?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | Coverage Δ | | |---|---|---| | [...th0\_flutter/CredentialsManagerMethodCallHandler.kt](https://app.codecov.io/gh/auth0/auth0-flutter/pull/289?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-YXV0aDBfZmx1dHRlci9hbmRyb2lkL3NyYy9tYWluL2tvdGxpbi9jb20vYXV0aDAvYXV0aDBfZmx1dHRlci9DcmVkZW50aWFsc01hbmFnZXJNZXRob2RDYWxsSGFuZGxlci5rdA==) | `90.00% <75.00%> (-4.74%)` | :arrow_down: | | [...tlin/com/auth0/auth0\_flutter/Auth0FlutterPlugin.kt](https://app.codecov.io/gh/auth0/auth0-flutter/pull/289?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-YXV0aDBfZmx1dHRlci9hbmRyb2lkL3NyYy9tYWluL2tvdGxpbi9jb20vYXV0aDAvYXV0aDBfZmx1dHRlci9BdXRoMEZsdXR0ZXJQbHVnaW4ua3Q=) | `72.97% <100.00%> (+0.75%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.