Preflight Checklist
Describe your problem
Its hard to embed the "state of the user in [our] application" when the state function callback has no parameters.
Right now we are forced to do something like that (which is impractical and defeats the purpose of having AuthURLHandler at all)
e.GET("/login", func(ctx echo.Context) error {
state := func() string {
return encodeState(&State{
Id: uuid.New().String(),
redirect: ctx.Request().URL.String(),
})
}
loginHandler := rp.AuthURLHandler( state, provider, urlOptions...)
loginHandler.ServeHTTP(ctx.Response(), ctx.Request())
return nil
})
Describe your ideal solution
Now, as a user i'd prefer receiving the Request directly from the state callback, which would be a lot more useful.
state := func(req http.Request) string {
return encodeState(&State{
Id: uuid.New().String(),
redirect: req.URL.String(),
})
}
e.GET("/login", echo.WrapHander(rp.AuthURLHandler( state, provider, urlOptions...))
Now, granted to maintain backwards compatibility you'd have to create a new function with a new name.
Version
HEAD
Environment
Self-hosted
Additional Context
No response
Preflight Checklist
Describe your problem
Its hard to embed the "state of the user in [our] application" when the state function callback has no parameters.
Right now we are forced to do something like that (which is impractical and defeats the purpose of having AuthURLHandler at all)
Describe your ideal solution
Now, as a user i'd prefer receiving the Request directly from the state callback, which would be a lot more useful.
Now, granted to maintain backwards compatibility you'd have to create a new function with a new name.
Version
HEAD
Environment
Self-hosted
Additional Context
No response