What is the best practice for iOS SDK refresh token?
Authentication Method: User Authentication(OAuth 2.0)
SDK: iOS Box SDK
Version: 4.2.0
Custom Token info: Yes
Code:-
if let oAuthSession:OAuth2Session = self.client.session as? OAuth2Session { oAuthSession.refreshToken { result in switch result { case let .success(token): expect(token).to(equal("new access token")) case let .failure(error): fail("refreshToken should succeed, but instead got \(error)") } done() } }
After 24 hours, Refresh token is failing with 401 error code. What is the best practice for iOS SDK refresh token?
Please guide me.
Thanks,
Prasad
Please sign in to leave a comment.
Comments
1 comment