We use Meteor login system. We link to our website from the app for some functionality, but when the user goes to this webview he has to log in again. This is quite a hassle for the user.
What we’d like to do instead is auto log him in. Meteor uses the browser’s local storage to do the login. If we can set the localstorage from the app when opening the webview he’ll be autologged in. I’m not sure this possible to do, but if it is I would love to know how.
If there’s another way to communicate with the webview that’s opened that would also be great.
One solution I can think of is sticking the login token in the url for the user and then place that into localstorage when the page loads although I’m not sure if that’s a security best practice to have the login token in the url.
I don’t think this is what we’re looking for. I want to send a user to our
actual site to do things. He’s already logged into the app. I just don’t
want him to login again which is what is currently happening.
i ask because SFSafariViewController doesn’t maintain cookies by default on ios11+. anyhow i think the solution i suggested of injecting data in url should do the trick just fine
I have a similar use case & am looking into using WebView for this since it allows me to manipulate cookies. However I like using WebBrowser & would love to see this added as a feature. (Having the ability to manipulate cookies)