rbrki07 / rn-expo-oauth-authorization-code-flow-pkce-keycloak

React Native (Expo) App with Keycloak and the Authorization Code Flow (with Proof Key for Code Exchange) of OAuth 2.0
MIT License
4 stars 1 forks source link

Possible unhandled promise rejection (id: 0): Error: Cannot prompt to authenticate until the request has finished loading #2

Closed darxsky closed 2 months ago

darxsky commented 2 months ago

Hi @rbrki07, thank you very much in advance for the clear guidance on this topic. I am working with your solution but but cannot start the application correctly.

I followed your guide step by step but when I try to type Sign in button I get the following error:

Possible unhandled promise rejection (id: 5): Error: Cannot prompt to authenticate until the request has finished loading.

I have an instance of Keycloak locally on port 8080 and I am running the application with Expo Go on my local machine (I am using the command npx expo start --tunnel) Could the problem be due to the fact that I am running the keycloak instance locally?

Thank you very much for your work and help.

rbrki07 commented 2 months ago

Hi @darxsky, Thank you for your feedback. Instead of localhost you could try and use the concrete ip address of your network interface like 192.168.100.10.

darxsky commented 2 months ago

It works! Thank you very much.