-
Notifications
You must be signed in to change notification settings - Fork 88
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
How to do the authentication regarding user table in DB? #44
Comments
Maybe a better question is, Is there any example for DB authentication? |
You should replace that with your own implementation
Not yet, but I fully understand your need for one. |
Hi, Maurits. Any news about this example? As I don't have great knowledge in php, this example would help me a lot... My use case:
TIA. |
Did you see this? https://github.com/mevdschee/vue-crud-ui It does not use "dbAuth" or "jwtAuth" or "basicAuth" middleware, but that is relatively easy to add. Is that what you are looking for? |
@nilopaim Maybe you can add the front-end for the login on that repo (via a PR) and then I'll add the back-end config? I'm not that familiar with Vue. |
If you want to implement the 'jwtAuth' flow, then you may want to read: https://github.com/mevdschee/php-api-auth |
@mevdschee I'm not a security guy, and due to this I think I'm lost on the flow... I have the frontend for the login, asking username and password, that I can validate using php-crud-api. Should I ask for php-api-auth generates me a JWT token ou could I only store this data on my frontend and use it to allow/disallow things on my application? I'll be grateful for any hints... |
Hello @mevdschee How can I use auth.php ): I mean I don't want to access URL directly without auth. Thank's |
It seems the login is done by hard coding!
While I expect it does the validation with a
user
table in the DB!Also I activated this config in the
api.php
:But then it will show the following error in the
vanila.html
after login byadmin:admin
:So it seems I need to connect the
auth.php
andapi.php
somehow to have the same session data and also do the authentication regarding a DB table!The text was updated successfully, but these errors were encountered: