-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support refresh token #26
Comments
@vanthanhtran245 this looks like a good idea, feel free to take a shot at it in a PR. |
#36 private var isRetrying = CurrentValueSubject<Bool, Error>(false)
init() {
restAPI.network.requestRetrier = { [unowned self] _, error in
if self.isRetrying.value == true {
return self.isRetrying.filter({ !$0 }).asVoid().eraseToAnyPublisher()
}
guard let error = error as? NetworkingError, error.status == .unauthorized else {
return nil
}
return restAPI.authenticate().eraseToAnyPublisher()
}
} |
@vanthanhtran245 this is live in 0.3.4, does that solve your use case ? |
Closing this for now, as this feature has been added in latest version. Feel free to reopen if needed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems this project not yet support request retry adapter like Alamofire. It would be great if it is supported in the next version
The text was updated successfully, but these errors were encountered: