You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error handling for refreshToken is not en par between iOS and Android, also with the current error codes, it's not possible to distinguish network errors and provider errors.
.cancelled, .accessDenied -> do they make sense here? Also the returned error code from the plugin is ERR_USER_CANCELED, which is imho not applicable, because there is no user interaction while refreshing
.stateNotEqual -> a refresh request does not include state, so this code can never occur here
all other errors return ERR_AUTHORIZATION_FAILED and as an app developer it is impossible to detect, if it was due to a network error or a provider error
Expected Behavior
It should be possible to detect, what went wrong during token refresh. If the refresh token is expired, the user should be logged out, but in case of network errors, it would be better to show network problem message or something similar and not just log the user out, which leads to a bad user experience on mobile.
The text was updated successfully, but these errors were encountered:
Capacitor version:
Run
npx cap doctor
:Library version:
OAuth Provider:
Your Plugin Configuration
Affected Platform(s):
Android
iOS
Current Behavior
Error handling for refreshToken is not en par between iOS and Android, also with the current error codes, it's not possible to distinguish network errors and provider errors.
For iOS: https://github.com/moberwasserlechner/capacitor-oauth2/blob/main/ios/ByteowlsCapacitorOauth2/Source/ByteowlsCapacitorOauth2.swift#L148
Codes:
Expected Behavior
It should be possible to detect, what went wrong during token refresh. If the refresh token is expired, the user should be logged out, but in case of network errors, it would be better to show network problem message or something similar and not just log the user out, which leads to a bad user experience on mobile.
The text was updated successfully, but these errors were encountered: