laravel-saml2
laravel-saml2 copied to clipboard
Do not use the default database to create the "tenant"
Currently when actions are executed on the tenant, they are carried out on the default database.
Add new variable in the saml configuration to use a different connection driver than the "default"
One of the solutions would be to run the migrations command with the --database option. If you have saml2_tenants in a different database, then you would also need to override the connection on the model.
I'd say this is not a common case, but I'd like to better understand your case and think about a more comprehensive solution rather than simply specifying a database connection on migrations.
In our case, we have all the Saml configuration in a sqlite database and the application runs with the default database that is in MySql.
The default "tenant" model uses the default DB, which in our case is MySql