Closed Ma3aXaH closed 2 years ago
Hello, I have the same error on iOS. Have you figured out where the problem is?
We found a solution to the problem. You have to set the Access Type parameter to public in the client settings and everything will work.
@Ma3aXaH did you find a solution?
Description Library constantly throws "Error: fetchTokens failed" after authorization. The authorization itself is successful. If done from a browser, login and password are valid and it opens the application, but when done from the app it closes in-app-browser and throws the aforementioned error. The keycloak server is setup properly, other web projects use it successfully, problem only occurs in react native implementation.
onEvent triggers with the following message:
onKeycloakEvent onAuthError {"error": [Error: fetchTokens failed], "error_description": "Failed to refresh token during callback processing"}
To Reproduce Steps: 1) Start application 2) Press Login 3) Enter email and password 4) Press Sign In
Expected behavior After authorization keycloak updates state to authenticated.
Smartphone
Additional context Here's the app code (same as the example, but with different app uri scheme and different keycloak url, realm, clientId):
Intent filter configuration in AndroidManifest: