I’m trying to make an app that uses the authorization based on cookies. But I have a problem. I can not get cookies from server in the application. I see them in the Chrome Dev Tools.
But there are no in the Response object in my app.
that cookie you see on the server has nothing to do with what you need in your app to authenticate. You need to provide more detail on where you are trying to authenticate yourself and what the server sends back to your client so you can store it and use it when you make some requests to that server.
Is it really possible to work with cookie-based authentication/session on Ionic 2?
As I observed cookie-based is best suited to Web-based applications. Please give your thoughts on this.
If so, is this advisable?
Or are we going to stick to Token-based authentication/session?
Please advice guys. I am a bit new to Ionic framework.
I am facing the same issue as well. I’ve been able to resolve this temporarily using the Ionic native HTTP plugin. This gives you control over cookies, like set, remove, and clear.
I am still looking for a solution that works with Angular. Any advice is much appreciated.
I have the same problem. It takes me ages to find out how to send a simple request from a device. In browser cookie is sent along, in device or simulator nothing is sent and it is not possible to find the Set-Cookie in the http res.headers[’_headers’] array.
Can somebody from Ionic answer the question? We are trying to adapt your technology, come on!
if you are doing CORS
cookies are stored on your back-end domain and can’t be access on front-end
you need to get cookies in back-end and send through the response