-
Notifications
You must be signed in to change notification settings - Fork 11
Use it with Authboss #27
Comments
Try app := fiber.New()
app.Use(adaptor.HTTPHandlerFunc(authboss.LoadClientStateMiddleware))
|
It doesn't work either. |
Hi @frederikhors |
Thanks @arsmn, I'll try it in a few minutes... Meanwhile, I opened gofiber/fiber#941 because I have a doubt:
Can you help me understand this point, please? Thanks. |
The http middleware works now! Two remaining issues:
I'm trying with this code which compiles: func main() {
ab := SetupAuthboss()
app := fiber.New()
app.Use(adaptor.HTTPMiddleware(ab.LoadClientStateMiddleware), remember.Middleware(ab))
app.Group("/auth", adaptor.HTTPHandler(http.StripPrefix("/auth", ab.Config.Core.Router)))
_ = app.Listen(":3000")
} but crashes at runtime:
FULL REPRODUCTION PROJECT HERE: https://github.com/frederikhors/fiber-and-authboss |
Hi @frederikhors, thanks to @arsmn you now can use app := fiber.New()
app.Use(adaptor.HTTPMiddleware(authboss.LoadClientStateMiddleware)) |
Oh, thanks @Fenny. I know that. I answered with another issue. Can you please re-open this, please? Thanks. |
|
|
For future reference; there is an issue with transfering context values when using a middleware (lets say you want to use auth0 jwt middleware). I'll try and find a solution and report here :) |
@mrsufgi did you find the solution? |
@mrsufgi Wondering about that solution as well, without context values Auth0's |
I'm trying to use authboss with Fiber.
I can't figure out how to use
LoadClientStateMiddleware
withadoptor
like this:the error is:
Cannot use 'authb.LoadClientStateMiddleware' (type func(h http.Handler) http.Handler) as type http.Handler Type does not implement 'http.Handler' as some methods are missing: ServeHTTP(ResponseWriter, *Request)
Is there a way I can fix this?
The text was updated successfully, but these errors were encountered: