Open cromoteca opened 5 months ago
As discussed internally, we could use a Java interface to be implemented in an endpoint and, if that interface is found, that could trigger authentication support and could allow to generate all needed files, including auth.ts
.
Describe your motivation
Hilla now generates many files automatically when using file router. Some of them need to be replaced with custom versions just to enable authentication, which is a need in almost all applications. That means giving up on automatic versions of those files.
At least
index.tsx
androutes.tsx
need to be customized, andauth.ts
added.Describe the solution you'd like
The generated files already contain support for authentication and nothing happens if authentication is not used.
Describe alternatives you've considered
No response
Additional context
But not everything can be set up automatically, as the developer still needs to provide the endpoint used to get user information, so he has to create an
auth.ts
file manually, as per documentation.