ionic-team / ionic-team/cordova-plugin-ionic-webview
Is it possible to set WKWebView headers so that I may pass authentication headers when using InAppBrowser or SafariViewController?
- Dominant language
- Objective-C
- Stars
- 493
- Forks
- 410
- PR merge metrics
- No merged PRs in 30d
Description
I built a mobile app as an offline counterpart to my desktop product. Now that those offline features have reached maturity, I would like my users to be able to access a subset of my online functionality through my app. The online app is mobile optimized, so I would like to avoid rewriting all that functionality in the native app.
To enable this, I want to allow the user to access my online site through the mobile app in an in app browser (without actually leaving the native app). However, when user goes to my site through the In App Browser for the first time, they are required to sign in again. This is less than ideal.
My solution is to pass the JWT token they receive from the native login to the desktop app site when they access the desktop site through the InAppBrowser. However, I do not see a way to set auth headers on IAB, or SafariViewController.
Is there an alternative that allows me to attain the desired functionality? Can I do this using WKWebView?
Contributor guide
Assessment
This issue has not been assessed yet.