Closed eliasjtg closed 1 year ago
Thanks for the report @eliasjtg - is this something you can help us look into @poovamraj?
@eliasjtg The plugin requires instance of an activity (context actually) to fetch the credentials. Since it is not available in the background, the operation fails.
Will it be possible for you to fetch the credentials before starting the background service and passing it there and using the service from there?
@stevehobbsdev for us to be not dependent on an Activity
we have to pass an instance of context from Auth0FlutterPlugin
which provides instance to an applicationContext
which seem to be used by official Flutter team as mentioned here
Hey @eliasjtg, we have implemented a fix for this. Can you checkout this PR in your project - https://github.com/auth0/auth0-flutter/pull/289
@eliasjtg since this is fixed in the PR mentioned above we will be closing this issue. The fix will be released in our next release.
Checklist
Description
I'm working in a isolate with background location, sending location to backend authenticated with Auth0.
auth0.credentialsManager.credentials()
This show the following exception:
Reproduction
Install plugin
background_locator_2
to run location background isolate Run the app Kill the app and attempt to get environment in isolateauth0_flutter version
1.1.0
Flutter version
3.7.8
Platform
Android
Platform version(s)
9