Login on and android app with password stored in DB hashed with PHP Password Hashing -
i'm using php 5.5 password hashing manage login in web application.
http://php.net/manual/en/book.password.php
our passwords stored in our database hashed using php password hashing. when user wants login compare hashed password database 1 typed user using password_verify
.
i want expand application allow login android application.
the solution have found call php process using post , send password , user name it. process answer 0 or 1 indicating whether login information matches stored username / password pair or not.
question:
is approach above best approach?
yes possible...
recommended:
it better , safe develop api in server using rest (now login ) can expand functionality in future.
additional : might need pass token or current session id server app along other data once created session. bcoz when need store data in sessions in server app should pass session id in every request server details session. because server cannot identify session id (phpsessid) of incoming request android app. (but possible when request browser)
otherwise have use db store session details.
Comments
Post a Comment