Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Life saver #13

Open
AntoineWtrnd opened this issue Jun 12, 2019 · 1 comment
Open

Life saver #13

AntoineWtrnd opened this issue Jun 12, 2019 · 1 comment
Assignees
Labels

Comments

@AntoineWtrnd
Copy link

This is not an issue but i just didn't saw any place.

But i want to thank you so much.

I was looking for how can i use my MySQL users table as log in system in React Native.

It work perfectly using JWT as session.

Thanks you!

@byjg byjg self-assigned this Jun 12, 2019
@byjg
Copy link
Owner

byjg commented Jun 13, 2019

Hello Antoine,

First of all thank you for the feedback.

About your question, React Native has another way pretty different than PHP in order to render the HTML page. PHP will render the page for every single request and because this you can check the information on the server and return only the HTML portion you want.

However React Native intends to render the pages locally. To gather data from the server you mostly use API. The API will create and validate the JWT and the React Native will only store locally this token. The requests will return status code 200 or 401 depending on the validation of the JWT and your page should respond accordingly.

Based on this, the project JWT Session will be useless if you intend to use React, React native, Angular, Vue or some similar approach.

To create API in PHP you can use Symfony, Silex, Laravel, etc or you can use a project I developed https://github.com/byjg/php-rest-template. I have some work to do yet, but is pretty functional and has everything I need to create API.

@byjg byjg added the q&a label Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants