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

onComplete is not being called #16

Open
natiginfo opened this issue Mar 25, 2019 · 5 comments
Open

onComplete is not being called #16

natiginfo opened this issue Mar 25, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@natiginfo
Copy link
Contributor

When I try to authenticate via fingerprint, onComplete is being invoked. After that, if I try to authenticate again successfully, onComplete is not being invoked.

@pwittchen
Copy link
Owner

pwittchen commented Mar 25, 2019

Hi,

Thanks for reporting that. Hm, I'm not sure if this is a bug. Actually, once you're authenticated and onComplete is invoked, then stream is finished, so it will no longer be active. When you restart Activity or invoke this in another Activity, it should work fine. I think, invoking onComplete twice on the same stream within the same Activity (without restarting/stopping/resuming Activity) doesn't really make sense.

@natiginfo
Copy link
Contributor Author

natiginfo commented Mar 25, 2019

Hi,
In single activity apps, it’s not possible to authenticate more than once, and it’s a problem.

@pwittchen
Copy link
Owner

It's done like that by design. Do you have a use case, in which you're authenticating user twice within a single activity? Can you explain situation your app? If it will make sense, then we can think about re-designing the library.

@natiginfo
Copy link
Contributor Author

natiginfo commented Mar 25, 2019

Sure. In our case, we use biometric authentication for login. However, user can choose to logout later and in that case app shows login view again. So, app has single activity and we use fragments. I believe, it’s possible use case for many apps, which use single activity approach, as navigation components has already stable versions too.

@pwittchen
Copy link
Owner

Ok, I'll have a look how to update the library to make it work for your case.

@pwittchen pwittchen added the enhancement New feature or request label Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants