You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 16, 2020. It is now read-only.
It would be great to be able to use the auth package when implementing something like the repository pattern. In SteamPress for Vapor 3, there is no knowledge of Fluent (at least the inner package). All the models are held behind repositories accessible from services. This would be fine, except for the fact things like BasicAuthenticatable that all the web sessions stuff relies on use DatabaseConnection to get the user for verifying. Because it's done in the protocol there's no way to implement the extensions yourself but still conform, meaning you have to reimplement most of the auth package 😞
Would be great to be fixed with Vapor 4!
The text was updated successfully, but these errors were encountered:
@0xTim I agree, this is something I've wanted to do. I think we could follow a pattern similar to how Vapor 4 will have separate packages for Fluent and FluentKit:
vapor/fluent-kit: 95% of Fluent, models, query builders, protocols, etc.
Following that, we could have vapor/auth and vapor/auth-kit. Where vapor/auth provides all the nice default extensions where your authenticable items are also models. That would allow you to theoretically use AuthKit with any ORM.
The other alternative would just be accepting that vapor/auth is an auth layer for Fluent. The win there is less complexity / package bloat.
@tanner0101 yeah an AuthKit and FluentAuth package would make sense. I think accepting vapor/auth as an auth layer for Fluent as it currently stands would be wrong as there's lots of stuff in here that doesn't need Fluent and could be broken out relatively easily with little changes. But splitting them into different packages with no dependency on Fluent would be a big win, especially for things like APIs that don't touch Fluent
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It would be great to be able to use the auth package when implementing something like the repository pattern. In SteamPress for Vapor 3, there is no knowledge of Fluent (at least the inner package). All the models are held behind repositories accessible from services. This would be fine, except for the fact things like
BasicAuthenticatable
that all the web sessions stuff relies on useDatabaseConnection
to get the user for verifying. Because it's done in the protocol there's no way to implement the extensions yourself but still conform, meaning you have to reimplement most of the auth package 😞Would be great to be fixed with Vapor 4!
The text was updated successfully, but these errors were encountered: