FormidableLabs / react-native-app-auth

React native bridge for AppAuth - an SDK for communicating with OAuth2 providers
https://commerce.nearform.com/open-source/react-native-app-auth
MIT License
2.04k stars 441 forks source link

iOS: Enable/Allow faceId touchid or any biometric action before redirect or close the modal/webview #978

Open lguardado opened 6 months ago

lguardado commented 6 months ago

Issue

Hi everyone.

I was wondering if it would be possible, after entering valid credentials and getting the token, to give the user some time in iOS to be able to save the credentials before closing the webview/modal.

If not, could someone point me in the right direction to try to do it myself in any of the library files? I was trying to do it with the following files, but I couldn't find the right spot to, for instance add some kind of timeout so the user is able to tap in "save credentials" after the credentials are validated and before the modal is closed.

node_modules/react-native-app-auth/ios/RNAppAuth.m ios/Pods/AppAuth/Sources/AppAuthCore/OIDAuthorizationService.m ios/Pods/AppAuth/Sources/AppAuthCore/OIDAuthState.m ios/Pods/AppAuth/Sources/AppAuthCore/OIDAuthorizationRequest.m

Thanks in advance!


Environment

Azure iOS react-native Version**: 0.73.6 react-native-app-auth Version: ^7.1.0

lguardado commented 5 months ago

hi! has anyone experienced this or has an idea of where can I take a look? thanks!

carbonrobot commented 5 months ago

The users enter credentials on the authentication sites of the configured providers. At that point in time, the user is not executing code from this library, so there isn't any hook you can use in this library to do so.

lguardado commented 5 months ago

Hi, thank you for your answer. I understand that opening and closing the webView is being executed precisely by this library. Closing it after redirect is the part I'm trying to avoid

The users enter credentials on the authentication sites of the configured providers. At that point in time, the user is not executing code from this library, so there isn't any hook you can use in this library to do so.

anehustorov commented 4 months ago

@lguardado hey, did you find a solution for this?

lguardado commented 3 months ago

@lguardado hey, did you find a solution for this?

hey @anehustorov sorry for the late response, I didn't get notified about your comment. Not really I didn't have the chance to continue investigating, but I believe it should be possible to do

lguardado commented 1 month ago

hi @anehustorov, did you attempt to fix this too by any chance? I reassumed working on this and having some clue would be nice