Closed ellmetha closed 10 months ago
I have a PoC but I haven't yet figured out how to add Auth::App
in the settings installed_apps
. Any idea how to go about it?
I think I found my solution here https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/syntax/transformer.cr.
Hey @kates! Thanks for taking a look into this.
Since I wrote the issue I actually changed the initial plan around the addition of this capability (and I forgot to close this issue 🤦). The goal now is to add that through the new generator mechanism that is being implemented as part of #121. With the upcoming 0.4 release, the new
management command will be used only for generating new repositories (projects or third-party apps) while the gen
management command will be used to generate various files and structures within an existing project.
As such, generating the auth
application should probably be implemented as a generator moving forward. For example:
marten gen authapp
The core of the generator implementation is already there and we can probably add a new generator (under src/marten/cli/generator
) in order to take care of the generation of the auth
app within an existing project.
The auth
generator was added as part of #121, which means that it will be possible to generate an authentication application within an existing project starting with the 0.4 release. 🚀 Closing this issue.
Description
The
new
management command allows to generate new projects or new application structures. When generating new project structures, a--with-auth
option can also be leveraged in order to add anauth
application to the generated project, which adds support for basic authentication.It would be interesting to be able to easily generate a new
auth
application structure to make it easier adding authentication to existing projects. In this light, let's ensure that it is possible to call thenew
management command as follows:This new structure type should support the interactive mode that was introduced in #74. It should also support the use of other existing command options and arguments. For example: