Appauth-android: idphint for google and facebook login like javascript adapter

Created on 7 Jan 2020  路  2Comments  路  Source: openid/AppAuth-Android

Is possible to use the same flow of javascript adapter?

keycloak.createLoginUrl({
                idpHint: "facebook",
            })

Most helpful comment

Hi,

The code you provided is for keycloak.js and the paramater idpHint is translated to kc_idp_hint in the final URI.
I just give a try with the lib and you can achieve this by using additionalParameters when building your AuthorizationRequest.

final Map<String, String> params = new HashMap<>();
params.put("kc_idp_hint", "facebook");
final AuthorizationRequest.Builder authRequestBuilder = new AuthorizationRequest.Builder(...).setAdditionalParameters(params);

All 2 comments

Hi,

The code you provided is for keycloak.js and the paramater idpHint is translated to kc_idp_hint in the final URI.
I just give a try with the lib and you can achieve this by using additionalParameters when building your AuthorizationRequest.

final Map<String, String> params = new HashMap<>();
params.put("kc_idp_hint", "facebook");
final AuthorizationRequest.Builder authRequestBuilder = new AuthorizationRequest.Builder(...).setAdditionalParameters(params);

I solved this issue and it works, now I need to implement with the mvp pattern #517

Was this page helpful?
0 / 5 - 0 ratings