Is there a Kotlin multi-platform library for encoding/decoding JWT? I’m trying to add JWT functionality in my KMP code and, if possible, I’d like to avoid having to embed platform specific JWT libraries for Android and iOS.
07/22/2020, 5:01 PM
As I know, client side does not support Bearer tokens at the moment => i dont think they have solved JWT on the client side somehow
I did not find one when I looked several months ago. I used an interface and passed in an implementation wrapping the auth0 jwt-decode libraries for iOS and Android. https://github.com/auth0/JWTDecode.swift
07/22/2020, 5:03 PM
Currently, my PR for Bearer token support is waiting to be merged. After that some one can start implementation of JWT support
07/22/2020, 5:09 PM
based on this - https://jwt.io/, it should be relatively simple to find a JWT lib for each supported platform, with an expect/actual bridge implementation
not ideal, but not that big of a deal really
07/22/2020, 5:17 PM
Thanks guys. For the time being, I’ll go ahead with embedding the platform specific libraries as suggested by @Sam.