Hi,
I’m currently wondering how to work around the limitation that Realm Sync doesn’t support Apple Watch (feature request), and I figured I’d just manually connect to Atlas using GraphQL from the Watch instead. It wouldn’t support update notifications (AFAIK), but I could at least pull & push data from the Watch.
My question is about how best to authenticate with MongoDB as a user on the Watch, if the user normally “Signs In With Apple” on the phone.
Say for example that in the iOS app, the user would always use Sign In With Apple to login:
let credentials = Credentials.apple(idToken: "<token>")
app.login(credentials: credentials) { (result) in
..
}
You can also “Sign In With Apple” from the Watch, which would also give you a token to use.
Can that same token be used to manually authenticate via a different mechanism than the SDK, i.e. can I somehow use that same token to connect to Atlas via GraphQL?
Edit: I see it is possible to sign in using the Realm SDK from WatchOS, is there any way to extract an authentication token from there?
Thanks