Skip to content

How do I version Rodauth routes? #231

Answered by janko
Samuelodan asked this question in Q&A
Discussion options

You must be logged in to vote

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 and prefix "/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.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Samuelodan
Comment options

@Samuelodan
Comment options

@janko
Comment options

Answer selected by Samuelodan
@Samuelodan
Comment options

@Samuelodan
Comment options

@janko
Comment options

@Samuelodan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants