First of all, thanks for the lib!
I hesitated to open an issue directly in the phoenix repo, but as it doesn't seem like both and neither a feature nor a bug, I didn't know where to put it, so here it is.
Sorry if it misplaced.
When creating an umbrella project with multiple app depending of the same Database, I use a vanilla app with Ecto as a base app for the database through the option: --context-app.
This allow each app to depend only from the specific DB instead of another one, as it place the context in a shared app.
Unfortunately, when running the phx.gen.auth cli, there is no option to indicate the place of the Repo module, forcing to have a Repo is the app where we want the auth.
Edit 2021/09/07: After some research, I found the possibility to do so by using the following config:
Unfortunately, and though the test was working fine alone, I couldn't manage to make it work in bulk as the mix.exs was remove from the folder due to another test.
@Aridjar Thanks for trying out this library! Now that phx.gen.auth has been merged into phoenix 1.6, I'm going to archive this repo. Would you mind opening this issue over on the phoenix repo?
Hello.
First of all, thanks for the lib! I hesitated to open an issue directly in the phoenix repo, but as it doesn't seem like both and neither a feature nor a bug, I didn't know where to put it, so here it is. Sorry if it misplaced.
When creating an umbrella project with multiple app depending of the same Database, I use a vanilla app with Ecto as a base app for the database through the option:
--context-app
.This allow each app to depend only from the specific DB instead of another one, as it place the context in a shared app.
Unfortunately, when running the
phx.gen.auth
cli, there is no option to indicate the place of theRepo
module, forcing to have a Repo is the app where we want the auth.Edit 2021/09/07: After some research, I found the possibility to do so by using the following config:
Though it isn't documented.
The code modification associated with the add of the
--context-app
is 1 line in the@switches
in the\lib\mix\tasks\phx.gen.auth.ex:84
file.Unfortunately, and though the test was working fine alone, I couldn't manage to make it work in bulk as the mix.exs was remove from the folder due to another test.