Ionic login with php


#1

Hi everyone, i’m new with ionic 3 and i don’t have any idea how to make a session in php and take it for all the pages of the app. Someone who can help me? (I’m sorry if i did errors writing this topic but i’m not english :frowning: )


#2

Tokens are better than sessions. I would recommend using JWT.


#3

thanks, do you have docs for me please?


#4

Was the link insufficient?


#5

link click badges is 1 (That me click)


#6

sorry i didn’t see the link :smile: i was sleeping ahahah


#7

While tokens are indeed much better than having to deal with sessions, there are times when you can’t change the PHP server. If you must deal with PHP sessions, you need to ensure you use withCredentials:true with your HTTP POST/GET requests. When you enable withCredentials, it handles the session cookies correctly . Note that if the session cookie is marked HTTP only (which means Javascript can’t access it), you won’t be able to access the Set-Cookie headers, but it will work thanks to withCredentials


#8

thanks i don’t need anymore help for this problem, could someone mark as solved?