Using retryWhen to update tokens based on http error code

前端 未结 3 895
我寻月下人不归
我寻月下人不归 2020-12-31 02:55

I found this example on How to refresh oauth token using moya and rxswift which I had to alter slightly to get to compile. This code works 80% for my scenario. The problem w

3条回答
  •  伪装坚强ぢ
    2020-12-31 03:26

    There's a different solution to solve this problem without using Observable. It's written on pure RxSwift and returns a classic error in case of fail.

    The easy way to refresh session token of Auth0 with RxSwift and Moya

    The main advantage of the solution is that it can be easily applicable for different services similar to Auth0 allowing to authenticate users in mobile apps.

提交回复
热议问题