go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

Add callback when go zero authentication is successful

Open z913123456 opened this issue 8 months ago • 3 comments

Go Zero has a callback after JWT authentication failure, and it is hoped that there will also be a callback when authentication is successful

z913123456 avatar Apr 10 '25 13:04 z913123456

This scenario is quite special. Can you add another middleware to solve it

codeErrorSleep avatar Apr 19 '25 04:04 codeErrorSleep

I can add a middleware to solve it, but it's tedious and requires that each API can be modified. I really hope to have such a feature to handle globally

王小刚 @.***

z913123456 avatar Apr 19 '25 04:04 z913123456

I also like the feature, it's little strange that go-zero provides WithUnauthorizedCallback, but don't provide any way to configure it

bluven avatar Sep 30 '25 07:09 bluven