At runtime, change the database connection in auth.authenticate() #4088
mkevison
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Good night Miquéias, how are you? Thank you very much. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
If you have a multi-tenant with each tenant having its own database this is required
I didn't find it in the documentation but thanks to the typescript I was able to do it
All you need to do is
auth.use('your-guard').config.provider.connection = connection
where yout-guard is your guard defined in config/auth.ts
And connection is the name of your database connection
after that you can call authenticate() method
Beta Was this translation helpful? Give feedback.
All reactions