'Persist authentication Laravel on iOS Devices
I'm currently building an app that basically wraps my Laravel webapp inside the react native web-view. The problem I'm currently facing is the iOS doesn't seem to persist authentication at all. Android seem to work fine even after I close the app and open it again but I've to log into the web-view every-time I open an app. What would be the solution here?
I do have a solution which is basically storing the some auth information after user logs in and store that in the AsyncStorage of React Native but I just am not able to find what exactly to push to asyncStorage. The app_session and csrf_token obviously doesn't help to authenticate user otherwise i could have just passed those when user opens app on iOS but it doesn't help in authenticating user in anyway.
Basically, I want to pull some value when user login in and send that to asyncStorage and when user reopens app in iOS, I want to pass that as cookie and make Laravel feel like it is an authenticated user. But I just don't seem to find what exactly should I pass to server via AsyncStorage.
Any help?
P.S. I'm not looking for any API authentication, just want a solution from existing web app.
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
