How do I version Rodauth routes? #231
Answered
by
janko
Samuelodan
asked this question in
Q&A
-
Hi there, |
Beta Was this translation helpful? Give feedback.
Answered by
janko
Sep 17, 2023
Replies: 1 comment 7 replies
-
The prefix "/v1" In rodauth-rails you don't need to make any modifications to the |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, essentially different versions will be processed by different Rodauth configurations (i.e. auth classes). In your example, you'd set
prefix "/v1"
in the main configuration andprefix "/v1/admin"
in the admin configuration.You'd probably want to version auth classes, just like you would version controllers. The Rodauth app should not be versioned, as there can be only one Rodauth app, which is called by the Rodauth middleware auto-inserted by rodauth-rails. The Rodauth app orchestrates auth classes, similarly how the Rails router orchestrates controllers.