Hey. I’m trying to decode a JWT on the client side...
# ktor
j
Hey. I’m trying to decode a JWT on the client side (in a Kotlin Multiplatform app) to get information out of the payload. I can see that
ktor-server-auth-jwt
exists but it (as the name suggests) is for server side and doesn’t have Native support. Does anyone have any suggestions on what to use? Thanks in advance 🙂 🙇
a
Ktor uses
com.auth0:java-jwt
dependency under the hood, which is, unfortunately, for JVM only.
j
Yeah I saw that. Been looking around for alternatives and this morning playing with doing it myself. Trying to find the best way. Is there no other option or suggestions at the moment then?
a
This one https://github.com/Appstractive/jwt-kt should solve the problem.
j
Ah great. Thanks a lot. I’ll take a look 🙇
m
as long as you only need to extract data the JWT format itself isn't too crazy
j
Yeah, that’s where I think I’m ended up. Just wanted to confirm something we already had wouldn’t just do it. 😅