breautek commented on issue #753:
URL: 
https://github.com/apache/cordova-plugin-inappbrowser/issues/753#issuecomment-661635512


   In more detail... in my apps, I have an authentication API that returns a 
JSON response, which contains the user's auth token, which I request via 
`XMLHttpRequest`. I don't actually use in app browser, since that's generally 
used to display UI that is outside of the app.
   
   Once I have the authentication token, it is saved to disk in a private 
location only readable by the application. On app launch, it is read to 
determine if A) it is valid, and B) if it is expired to determine if the login 
screen should be presented or if I can proceed to the main screen.
   
   Throughout the lifetime the session, all API calls contains a custom header 
containing the auth token to the server. The server reads the request headers 
instead of cookies for authorising requests.
   
   This obviously requires some work managing tokens on the frontend client.
   
   Staying on the cookie issue though, there is a 
[plugin](https://github.com/CWBudde/cordova-plugin-wkwebview-inject-cookie) 
that hack fixes some cookie-related problems, namely syncing, but I have no 
idea if they will work with cookies from in-app browser webview, or if they 
deal with third-party restrictions.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to