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
1.96k stars 438 forks source link

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

Open lguardado opened 1 month ago

lguardado commented 1 month 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 3 weeks ago

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

carbonrobot commented 3 weeks 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 2 weeks 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.