When I open my web app on my iOS device, login and restart Safari, I am still logged in.
But when I add this page with "Add to Home Screen", each time I click the icon for that page, I have to login again.
Is there a workaround for this with the Devise gem or is there really no other way but building a native app?
One thing you can try is the following.
You can add something to your DOM, for example hidden div, with the data you need to log user in:
<div id="authentication-div" data-user-id="5" data-user-key="abbbbaafff12899a9a">
Then you fetch that div from javascript and use its data to make authenticated request to your backend. Of course that will work only if your user saved your app to home screen after they have been signed in (and you should reload the page on sign in as well).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With