-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
May also need extra user information but not just the token #243
Comments
My Solution: ... user, exists := c.Get("UserData") |
Works well, I've put c.Set() more precislley in Authenticator |
@colonelpopcorn Yes, Thank you for reminding me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using
github.com/appleboy/gin-jwt/v2 v2.6.3
Part of the Authware definition is like this:
It seems you suppose user want the token as
the data
for there's no way to getuser
information.Though, as a backend developer, I can get everything I need, the frontend may also need something else (like roles/permission to show/hide something, which I don't want to do another query because during the step of
Authenticator
, I already get theuser
).So, I think this callback may can be defined as
LoginResponse: func(ctx *gin.Context, i int, s string, u interface{}, t time.Time)
so that, I can get other information returned.
The text was updated successfully, but these errors were encountered: