auth0 / auth0-flutter

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

Be able to Set/Remove LocalAuthentication. #465

Open MauriMiguez opened 3 months ago

MauriMiguez commented 3 months ago

Checklist

Describe the problem you'd like to have solved

In the particular App im working on, we would like to be able to toggle on or off LocalAuthentication based on user preference. Right now I don't see a way to either remove or add LocalAuthentication from an Auth0 or CredentialsManager already created instances.

To be more specific: if you already instantiated Auth0 without LocalAuthentication there is no way you can add it now.

Describe the ideal solution

I would for the API to expose a method to be able to add/remove local authentication.

Alternatives and current workarounds

The only work around I can think of is to make another instance of Auth0 in which CredentialsManager will be injected with the new LocalAuthentication.

Additional context

Currently I create the Auth0 instance during the initialization of the app and after that is injected into the corresponding classes that need that instance. So is at that point that I decide to either add local biometrics or not add it.

If user decides that now it wants to add it I would have to re-instantiate the object and inject it again which is troublesome.