Handling Access Tokens and Refresh Token in an Apple Watch Companion App

13 Views Asked by At

I attempted to implement a solution that involves sending the authentication access token from the app to the companion watch app via WatchConnectivity as soon as the user logs in on the main app. This is done by using the updateApplicationContext method and then storing the access token in the watch's keychain. What is the best way to refresh the token on the watch without invalidating the token stored on the iPhone app.

I have tried to refresh the access token using the refresh token on the watch. Unfortunately, this process invalidated the refresh token stored in the iPhone's keychain, causing the user to be logged out from the iPhone app.

0

There are 0 best solutions below