If i follow the doc https://www.mongodb.com/docs/atlas/app-services/authentication/apple/ i get the error “Failed to log in: failed to lookup key for kid=xxxx” in xcode debug.
Using this guide Synced Realm on iOS with SwiftUI using Sign-in with Apple for Authentication i use the SignInWithAppleButton button for generete the jwt token and it works.