Hi guys, sorry if this feels repetitive, but I ask...
# multiplatform
s
Hi guys, sorry if this feels repetitive, but I asked this question earlier and didn’t get any reply at all. So we’re trying to implement Single Sign-On (SSO) using Microsoft Authentication Library (MSAL). But we haven’t found any solution that works for Kotlin Multiplatform. I understand this might be easy for some, but I’m currently struggling to implement it on the iOS side. I’m not here asking for a full solution (though if you have one, I’d love to see it), but rather a guide on how I should implement it on the iOS side.
j
Looks like existing this https://github.com/AzureAD/microsoft-authentication-library-for-objc. Just add the cocoapod into iOS target for this I guess. I would guess just work interop with Kotlin as this is ObjC which seems to be supported. I havent used MSAL at all myself though, maybe already tried this? This is the advantage of KMP imo, can use native libs per platform when needed. And if want can use expect/actual bridge interfaces if want to have your code of SSO in commonMain but swtich the MSAL adapter per platform, without using a library.
s
Hey Joel! Thank you so much. It's working.
🎉 1
j
Glad to hear! 🙂
😁 1
a
@Joel Denke do you have any reference material ? I need to implement this same. Android side code is working but for ios 1. We created ObjC class and methods 2. also tried adding header iosApp-swift.h But ObjC class is not accessible in iosMain
j
No idea, havent used this library so dont know. Make sure adding the library binaries with cocoapods on iOS dependencies 🙂
a
Ok will check and get back to you 🙂