jhipster / generator-jhipster-react-native

A React Native blueprint for JHipster
https://jhipster-sample-app-react-native.vercel.app/
Apache License 2.0
266 stars 54 forks source link

Redirection fail in React Native #95

Closed grajuu closed 4 years ago

grajuu commented 4 years ago

Hi @ruddell

After clicking on Login button its redirection to following,

Invalid parameter.redirect:redirect_uri

image

gnite doctor
System
  platform           darwin
  arch               x64
  cpu                4 cores          Intel(R) Core(TM) i7-5650U CPU @ 2.20GHz
  directory          docker-compose   /Users/mardubudi/Documents/PBIS-REPO/tis-jhip/tis-mySchool/docker-compose

JavaScript
  node               12.16.1      /usr/local/bin/node
  npm                6.14.5       /usr/local/bin/npm
  yarn               1.22.4       /usr/local/bin/yarn

Ignite
  ignite-cli         3.5.1        /usr/local/bin/ignite
  ignite src         build        /Users/mardubudi/.config/yarn/global/node_modules/ignite-cli/build
  generators         {}

Android
  java               11.0.4       /usr/bin/java
  android home       -            undefined

iOS
  xcode              11.4.1
  cocoapods          1.9.1        /usr/local/bin/pod
mraible commented 4 years ago

Did you restart Keycloak after you generated your React Native project?

From the OAuth2 OIDC docs:

The app's URL scheme is declared in AppConfig, build.gradle, AndroidManifest.xml, and Info.plist. By default it uses your app name.

Add the URL scheme from above as a valid redirect URI, followed by the word "authorize". For example, if your URL scheme is oauth-app then the redirect URI should look like oauth-app://authorize. This is patched in JHipster's Keycloak docker config so you may need to restart the docker container.

grajuu commented 4 years ago

Yes i did multiple times "Keycloak" and "Gateway" as well @mraible , I changed "localhost" to "127.0.0.1" in app-config as well. but tuff luck.

grajuu commented 4 years ago

Hey @mraible ,

This is my system fault :) the old docker didn't get refreshed, I removed the docker, and rebuild the complete gateway and ran and now the login redirect problem got fixed.

-- Thanks