Kotlin Multiplatform Implementation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- mobile-dev
Research direction
Start by reviewing the README, EXAMPLES.md, and API documentation linked in the issue, then trace the library's Base64 and Parcelable usage. The work is done when those Android-specific functions are replaced with Kotlin Multiplatform-compatible behavior, including the proposed Base64 decoding path, without requiring native implementations.
Written by the indexing model from the issue text.
Description
Checklist
- I have looked into the Readme and Examples, and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
Hello all,
this library currently won't work with kotlin multiplatform module because it's using the:
- https://developer.android.com/reference/android/util/Base64
- https://developer.android.com/reference/android/os/Parcelable
It would be nice to replace this function with ktor's utility function: - https://api.ktor.io/ktor-utils/io.ktor.util/decode-base64-bytes.html
Example implementation in my code (splitToken is copied from this project)
val jwtBody = JWTPayload.splitToken(loginData.access_token ?: "")?.get(1)
if (jwtBody.isNullOrEmpty()) {
throw IllegalArgumentException()
}
val jwtAccessToken = Json{ ignoreUnknownKeys = true }.decodeFromString<JWTPayload>(
jwtBody.decodeBase64Bytes().decodeToString()
)
if (jwtAccessToken.sub.isEmpty()) {
throw IllegalArgumentException()
}
Regards,
Luca.
Describe the ideal solution
Replace base64 and parcelable function/object.
Alternatives and current workarounds
Implement native code functions/libs.
Additional context
No response
- Dominant language
- Java
- Stars
- 455
- Forks
- 81
- Avg merge
- 5h 23m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/JWTDecode.Android
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
auth0/JWTDecode.Android#100 · 9 comments · 1 reaction ·
-
Include proguard consumer directives for R8 compatibilityMay be free again A pull request for this issue was closed without being merged. Openfeature request
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
auth0/JWTDecode.Android#72 · 7 comments · 3 reactions ·
All issues in auth0/JWTDecode.Android
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
it-at-m/Wahllokalsystem#3846 ·
Maintainers usually reply within 2 days
-
Area/Connector module/solace Priority/Low Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
ballerina-platform/ballerina-library#9849 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Vakore/ZappierGames#327 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPossibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mit-cml/appinventor-sources#4246 · 1 comment ·
Maintainers usually reply within 1 day