hi there.
I recently tested authentication generator on a brand new project, and despite the feature being really useful, I need to use a JWT token as Authorization header rather than a cookie.
I propose to add an option, token, to the generator.
Using only token option generate a JWT token and provide it as a query param to views.
Using both token and api options generate a JWT token and render it as a response, fully decorrelating authentication from views.
Is jwt part of the Ruby standard library now? I see your generator depends on it. Or is the assumption that people usign this should have it as part of their gemfile already
Oh I don’t know either. This is my first time being active in the forum since I joined 13 years ago. I think someone would get through to the pull request at some point
Well, it has been closed.
“Thank you for the pull request but it is by design that the authentication generator is simple and don’t cover all the use cases. We don’t want to complicate its logic. We will not be accepting new ways of authenticating.”
Why can’t you write your own generator that either extends or overwrites the Rails generator to do this? This definitely feels like an optional feature that could be provided by a separate gem.