Skip to content
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

panic: interface conversion: interface {} is *jwt.Token, not *jwt.Token (types from different packages) #80

Closed
cleveng opened this issue Dec 3, 2020 · 3 comments
Labels
🤔 Question Further information is requested

Comments

@cleveng
Copy link

cleveng commented Dec 3, 2020

filename: A.go
user := ctx.Locals("user").(*jwt.Token)
// panic: interface conversion: interface {} is *jwt.Token, not *jwt.Token (types from different packages)

the code copy auth-jwt from the demos , today when i want to get auth message show the error .
login method use the lib of github.com/dgrijalva/jwt-go .

when i change the file A.go, important "github.com/form3tech-oss/jwt-go" to replace old jwt-go.
it is work. not panic error .
Why ?

@welcome
Copy link

welcome bot commented Dec 3, 2020

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template!

@hi019
Copy link
Contributor

hi019 commented Dec 3, 2020

The new Fiber JWT library uses form3tech as you've seen because of a vulnerability in the previous JWT package: dgrijalva/jwt-go#428 . Is that what you mean?

@hi019 hi019 closed this as completed Dec 7, 2020
@hi019 hi019 added the 🤔 Question Further information is requested label Dec 7, 2020
@Intevel
Copy link

Intevel commented Jul 30, 2023

Facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 Question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants