singpass / Android-Singpass-in-app-browser-login-demo

This repository demonstrates and details the implementation using Chrome Custom Tabs or external web browsers to initiate a Singpass login using Oauth PKCE flow
3 stars 2 forks source link

Deeplink for re-direction does not work. App is stuck on the browser #9

Open kaarthicksiyer opened 6 days ago

kaarthicksiyer commented 6 days ago

@kenneth-leong-gt We were using a webview to open the singpass url incase user doesn't have the app installed. Before the support for webview was removed, we were doing some custom implementation on the webview's shouldOverrideUrlLoading to handle the redirection.

The url was constructed from the app side but cannot disclose it here due to privacy.

However right now we have no control over the custom tab's loading and upon observation it looks like the browser is loading the re-direct url and returns an error because it requires authentication on the app side. Please see attached screenshots

Step 1: Load singpass url on CCT singpass-step1

Step 2: Choose face verification singpass-step2

Step 3: After successful verification, it lands on this screen. singpass-step3

Step 4: In the webview implementation, we were able to catch the redirection url and navigate to our app's page with the data received after clikcing "Agree". But now, the browser tried to load the redirection url and returns an error singpass-expiry

how do we resolve this?

Also as per your instructions, I tried to append the redirect_uri_https_type=app_claimed_https to achieve deeplink navigation but that also didn't work.

kenneth-leong-gt commented 6 days ago

Hi, what URL is the last screenshot's error message from?

kaarthicksiyer commented 6 days ago

@kenneth-leong-gt its the redirect_url value passed from singpass which is actually one of ur backend url. I won't be able to share it here due to confidentiality

kenneth-leong-gt commented 6 days ago

did u try the flow in staging? sing your staging client id?

kenneth-leong-gt commented 6 days ago

the things i can think of that may be the problem is that, your AndroidManifest.xml may not have configured correctly for the redirect_uri to launch back you app from the cct.

Can you check if these steps are followed? https://github.com/singpass/Android-Singpass-in-app-browser-login-demo?tab=readme-ov-file#in-the-androidmanifestxml

kaarthicksiyer commented 6 days ago

Sorry I didn't get you. What do you mean by "sing your staging client id" ?. Btw all of this is from my production account since the face verification is available only on prod

kenneth-leong-gt commented 6 days ago

sorry typo, using your staging client_id

kaarthicksiyer commented 5 days ago

@kenneth-leong-gt I have tried with our staging client id. Its still the same. Please let me know if there is a way to contact you so that i can share logs. Thanks