alexedwards / scs

HTTP Session Management for Go
MIT License
2.12k stars 166 forks source link

Gin middleware #118

Closed gandaldf closed 2 years ago

gandaldf commented 3 years ago

Hi! Is there a way to get SCS working with Gin? I didn't find any middleware or example, could anyone please help me to find out a way?

alexedwards commented 2 years ago

I'm afraid that I never use Gin, so I don't have any experience here.

Did you get it working?

gandaldf commented 2 years ago

Unfortunately no, I'd really like to use SCS in production but I haven't find a way to make it work with Gin. I'm not really expert about the internals of that router so I hoped you could help me with it. Wouldn't it be nice if SCS included some adapters for major routers? Something like you did for DBs but for the middlewares; small packages so anyone can embed just what it need.

gandaldf commented 2 years ago

Here there's a Gin middleware that probably worked with an old SCS version: https://github.com/ms-xy/go-gin-extras/blob/master/middlewares/session/middleware.go I'm having hard times trying to update it to the new version.