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

[QUESTION] : is there a way to make this work in Flutter app ? #7

Open Riyanp opened 9 months ago

Riyanp commented 9 months ago

Hi, i need to ask this question

Is there a way to make this work on Flutter app ? I have made some kind of workaround by opening the intent://link.... url on the external web browser (so it can open the SingPass app), but after user approve the login, it's not triggering the app link url provided in the redirect_uri.

Since AppAuth library for flutter cannot set the state to null, i can't implement this in Flutter using that library.

kenneth-leong-gt commented 8 months ago

Maybe you can consider using Flutter's platform integration to call the platform native codes.

Riyanp commented 8 months ago

Alright will try that for now, will get back with the result.

Riyanp commented 8 months ago

managed to make this work by using flutter custom tab library and setting up our own deeplink as the redirect uri

but somehow when user successfully logged in and they try to request the token for the second time, it automatically returns a valid code without having to approve the login

does the app auth implementation have the same behavior @kenneth-leong-gt ?

kenneth-leong-gt commented 8 months ago

looks like an SSO, is your e-service id u are using part of an SSO group?