box-ios-sdk
box-ios-sdk copied to clipboard
Refresh token is failing with 401 error code.
Authentication Method: User Authentication(OAuth 2.0) SDK: iOS Box SDK Version: 4.2.0 Custom Token info: Yes Xcode: 12.0.1
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
@sujaygarlanka , @PJSimon Any update on this please?
I have the same issue, I can't refresh the token after 24 hours. Im creating a TokenInfo and then after getting the OAuth2Client and im calling refreshToken method from the currentSession, but it's failing with "token is expired".
This issue has been automatically marked as stale because it has not been updated in the last 30 days. It will be closed if no further activity occurs within the next 7 days. Feel free to reach out or mention Box SDK team member for further help and resources if they are needed.
This issue has been automatically closed due to maximum period of being stale. Thank you for your contribution to Box iOS SDK and feel free to open another PR/issue at any time.