Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
189 views
in Technique[技术] by (71.8m points)

javascript - How to login react native app with hashed php password?

How to verify hash password ? React Native App

{"s_password":"$2y$15$ecrPZbuAEfZlDJVB9gDO9OO94p5f/73Pp4ZhxAu594i.mRPtwUPcq","s_secret":"mjfGvDL2","s_email":"[email protected]"}
question from:https://stackoverflow.com/questions/65840077/how-to-login-react-native-app-with-hashed-php-password

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

you will need to create an api function and oAuth2 service that will authorize user and generate accesstoken, for your app sessions, laravel has very good oAuth2 Provider as Passport, which helps authorization and generating access token. https://laravel.com/docs/8.x/passport

you will create a login user service in react-native , that will send request to your web server and login Input, on your web server in Php you verify the user password , then return response and accesss tokn.

Below some oAuth libraries for php.

https://oauth.net/code/php/

An article regarding how to use oAuth2 in web application

https://developers.google.com/identity/protocols/oauth2/web-server


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...