How to support WebAuthn in WKWebViews or on PWA based IOS app - progressive-web-apps

I am using webauthn for biometric authentication like fingerprint scan in my pwa.
Now to publish it on IOS as an app I have used pwabuilder.com to get an ios package, which packages pwa to load it in wkwebview so that it can run on ios as native app. Now when I am running this pwa ios package using xcode everything is working fine except biometric login.
I checked online and it seems wkwebviews don't support webauthn. Is there any work around for this?
We tried using SFSafariViewerController and with this, webauthn works fine but once user presses done on safariviewercontroller UI it reaches back to login page so we will need to send some authentication information to WKWebView which initiated that SFSafariViewerController in order to authenticate user. Can anyone tell us how can we share the data between SFSafariViewerController and WKWebView?

Related

Ionic and MSAL Authentication for app opened within in app browser

I have an Ionic app that needs to authenticate using msal angular for Azure, the user is able to sign in flawlessly on the login screen that opens up in an in app browser.
I have a link to another app which uses the same token for login, so in the native devices this app opens up in another in app browser when clicked on that link, but the user is not SSO'ed into that app. But the user is SSO'ed automatically on the PWA version.
Any idea on how this can be achieved on the native devices as well? I know we need to access the token from the cookie jar but im unable to find an example/documentation of such a scenario.
Thanks in advance.

Ionic 3 running in the browser: application navigates to root when switch back to Safari

I have built an Ionic 3 app which will be served in the browser (as a PWA).
I build it using ionic cordova build browser --prod, everything works as expected, but in iOS's Safari there is a strange behaviour: the app navigates between pages using the NavController's push method and the url changes, using a hash strategy, and when the user go to another app and then returns to iOS, the location from my Ionic app "reset" and the user is sent to to root.
Anyone has any idea of why this can be happening? This does not happen in Android's Chrome.
What you are experience is a known 'bug'
Maximiliano Flirtman expose that behavior for ios PWA with:
Your PWA won’t keep state between sessions, if the user gets out of a PWA, it will be restarted when coming back, so if you need the user to validate an email, SMS or do a two-factor authentication, have that in mind to offer a proper solution.
See all Maximiliano Flirtman post.

Ionic Facebook plugin work only on one phone

I'm building an Ionic app with Facebook Login support.
I'm setting all as required in the developer.facebook.com settings and on config.xml on ionic config.
The login works fine for only my phone.
On every other phone the method facebook.login(['email']) reject Promise and pass an empty error.
How is it possible, counting that every configuration is compiler-related and not phone-related? There isn't config that uses device information.
Is really strange because I'm expecting does or doesn't work everywhere.
On every phone I've tried, Facebook app is installed and logged. No Facebook Lite installed.
Find the problem.
Facebook dev app was is develop mode so only me can access.
Possible solutions are:
Make in prod mode the app
Add other users facebook account to tester list

Xamarin Native Facebook iOS does not use the Native FB app

Im am trying to make my Xamarin iOS app use the native Facebook login but I get the browser instead of the native functionality.
I have: Url schemes, FacebookAppID, FacebookAppName in place in my info.plist
In my Facebook app I have added an iOS app and set the BundleId to my bundleId. Also I have set SingleSignon true (read that somewhere)
I have left the URL Scheme Suffix empty (don't know what to put there)
I have installed the FB app and logged in to this on the IPhone I am using but still the darn Webview is showing.
A login using the webview goes fine and if I quit the app and rerun the app the Xamarin Login button does say that I am logged in (displaying Logout)
Can anyone help?
Kind regards
Martin
Facebook has intentionally disabled switching to the native App, see blog post from late 2015: https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9
try this, it supports native fb login https://github.com/IdoTene/XamarinFormsNativeFacebook

App Store can accept this flow or not

I have integrated Facebook functionality into my applications. By using the link https://github.com/facebook/facebook-ios-sdk, I have integrated the Facebook. In this application, at the time of login, it's opening Safari and at the same time the application is going to the background and then after login again it's coming back to the application. My intention is that this flow can accept the application store or not.
This is the official Facebook iOS SDK and many apps in App Store already use it. So you can use it inside your app.
Also, the flow in your question is exactly what the documentation of the library describes and is, again, used by apps that are already in App Store:
If the device is running in a version of iOS that supports multitasking, but it doesn't have the Facebook app of version 3.2.3 or greater installed, the SDK will open the authorization dialog in Safari. After the user grants or revokes the authorization, Safari redirects back to the calling app. Similar to the Facebook app based authorization, this allows multiple apps to share the same Facebook user access_token through the Safari cookie.
So, yes, there is nothing wrong with this flow.