Skip to content

dbAuth authentication for active users #892

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

Closed
chattago2002 opened this issue Jul 25, 2022 · 5 comments
Closed

dbAuth authentication for active users #892

chattago2002 opened this issue Jul 25, 2022 · 5 comments
Assignees

Comments

@chattago2002
Copy link

Hello.
I'm working with this repository and I'm proud to use it, it saves me a lot of time.

I need to understand if it's possible to do the following.
I use "dbAuth" in "middlewares" and authentication is working fine, reading username from "email" column and "password" from "hashed_pwd" column of "users" table.
However in this table I have an additional column with the "state" of the user (active or inactive), so I need to allow authentication only for active users.
How can this be made?

@mevdschee
Copy link
Owner

How can this be made?

You could make a view that holds only the active users and use that as the users table.

@mevdschee mevdschee self-assigned this Jul 25, 2022
@chattago2002
Copy link
Author

You could make a view that holds only the active users and use that as the users table.

Thanks you very much. I'm deeply absorbed in the project. A simple solution was in front of me but no able to see it. Thanks again

@mevdschee
Copy link
Owner

mevdschee commented Jul 25, 2022

Great, thank you for your kind words. Let me know whether or not this works for you. Kind regards, Maurits

@chattago2002
Copy link
Author

Great, thank you for your kind words. Let me know whether or not this works for you. Kind regards, Maurits

Yes, it's working fine. Thank you so much

@dswdcares

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants