Hi everyone :wave: I have just released v0.2.0 of...
# feed
p
Hi everyone 👋 I have just released v0.2.0 of an open-source Kotlin Multiplatform WebAuthn/passkey library. K 🔑 It's aimed at teams building passkey flows across Ktor backends, Android Credential Manager, and iOS AuthenticationServices, with typed models and standards-first validation instead of thin wrappers only. Repo: https://github.com/szijpeter/webauthn-kotlin-multiplatform I'd really value feedback on adoption blockers, missing integrations, and interop edge cases.
🤩 2
🔥 3
p
Hey, aren't the platform dependencies commonized? - it seems that I need to add the Android dependency in commonMain. Shouldn't that be under AndroidMain? Same as the other platforms. Also, is a server dependency needed on the client? - Can you be more explicit in which dependency go in which platform target dependencies DSL block
p
Yep, exactly. In KMP, commonMain should only need the shared/common modules. You only declare platform-specific dependencies when you actually use a concrete platform implementation on that target. So in practice:
Copy code
commonMain {
  implementation("io.github.szijpeter:webauthn-client-core")
  implementation("io.github.szijpeter:webauthn-network-ktor-client") // optional
}

androidMain {
  implementation("io.github.szijpeter:webauthn-client-android") // only if you use AndroidPasskeyClient
}

iosMain {
  implementation("io.github.szijpeter:webauthn-client-ios") // only if you use IosPasskeyClient
}
And no, you should not need any
webauthn-server-*
dependency on the client side. The compose-passkey sample is probably the best reference for how the source set split is intended to look in practice. But yeah, the readme is confusing in this regard, I'll update it in a bit. Thanks for the feedback! 🙌
p
gratitude thank you