Android Question In app registration and login system, save user data.

Sub7

Active Member
Licensed User
Longtime User
Hello,
I am developing an application "a niche social network" where users can create their profile, upload galleries add friends and play contests, games and other things.
They need to be registred in order to use the service so i have written a registration and login system which interacts from b4a app to linux a server using php + mysql.
I was able to write a robust php code to manage members registration, login and profiles and retrieve output, but now im stuck in how to save login details of users which are already logged into the social so there won't no need to sign in again.
For security reasons i need to something pretty safe and that cannot be hacked so easily.
I was thinking to write a file somewhere with login details and phone id, then when the app start check if this file exist, query the server by matching user and pass and phone id and then let the users sign in without ask the password again.
However i think that will be very easy to hack accounts, any suggestion?
how facebook, instagram and others save data on phone? which is the best way?

Thank you
 

Sub7

Active Member
Licensed User
Longtime User
You do not need to write the phone id in a file. Only some "random" key received from the server.

You should then send this key together with the phone id to the server and see whether they match.
Thank you,
how i can create, write and read this file?
For example at the login screen if the user set the checkbox to "save setting" then the file need to be created and written, from inside the app if the user log off then it must be deleted and so on, i'm a b4a beginner so sorry if is a dumb question.

Thanks
 
Upvote 0
Top