I’m trying to implement authentication through Itsme in my application. Itsme implements the OpenID Connect protocol. I am testing through the Expo app on Android in development mode, i.e.
expo start --tunnel and then scanning the QR code with the Expo app on my Android phone.
The way it works is:
- The user clicks on “Create an account” button
- A URL to open the itsme authentication app is constructed. This URL looks like
https://e2emerchant.itsme.be/oidc/authorization?client_id=xyz&response_type=code&scope=xyz&redirect_uri=exp://3q-gis.curvo.curvo.exp.direct:80/--/itsme-callback&claims=xyz. The redirect_uri parameter is constructed with
- I execute
Linking.openURLwith this URL. This opens the itsme app and the user proceeds with the authentication. This works.
- The itsme app then sends a 302 request to the redirect URL, which is
exp://3q-gis.curvo.curvo.exp.direct:80/--/itsme-callback, along with the authorization code as a parameter.
- This re-opens the Expo app with my app inside of it. But I can’t find a way to fetch the URL of the redirect request. I need to get the authorization code parameter to proceed with the authentication flow. I set up a
App.jsbut the callback is never fired.
Any thoughts on why the callback is never fired?
$ expo diagnostics Expo CLI 3.13.8 environment info: System: OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver) Shell: 4.4.20 - /bin/bash Binaries: Node: 12.13.1 - ~/.asdf/installs/nodejs/12.13.1/bin/node Yarn: 1.22.4 - /usr/bin/yarn npm: 6.12.1 - ~/.asdf/installs/nodejs/12.13.1/bin/npm npmPackages: expo: ^36.0.0 => 36.0.2 react: 16.9.0 => 16.9.0 react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4 npmGlobalPackages: expo-cli: 3.13.8