Open alex-kor opened 1 year ago
Hi Rosario. Any updates on this issue? Do you have any possible ideas when you think you can fix it?
Hi @alex-kor, GenericOAuthProviderBuilder
is not a documented API, and is not currently meant to be used to implement custom OIDC providers. The parent constructor for GenericOAuthProviderBuilder
explicitly checks that the ID provided is one that is intended to be used in FirebaseUI: https://github.com/firebase/FirebaseUI-Android/blob/5b6c9f01f5a674d754d8e9b1242197fe040086e7/auth/src/main/java/com/firebase/ui/auth/AuthUI.java#L632-L638
Supported providers are: https://github.com/firebase/FirebaseUI-Android/blob/5b6c9f01f5a674d754d8e9b1242197fe040086e7/auth/src/main/java/com/firebase/ui/auth/AuthUI.java#L118-L140
Adding the ability to set any OIDC provider sounds like a useful feature request, so I've added the feature request label to this issue. In the meantime you'll need to fork the library if you want to modify it to support a custom OIDC provider.
environment
the problem:
Making a connection to OIDC provider which is added through Firebase console App crashes when assembling list of Providers using provider builder:
AuthUI.IdpConfig.GenericOAuthProviderBuilder("oidc.provider-id","provider-name", R.layout.oidc_button).build(),
Steps to reproduce:
Observed Results:
logcat: FATAL EXCEPTION: main Process: com.tmobile.authentication, PID: 9550 java.lang.IllegalArgumentException: Unknown provider: oidc.provider-id at com.firebase.ui.auth.AuthUI$IdpConfig$Builder.(AuthUI.java:635)
at com.firebase.ui.auth.AuthUI$IdpConfig$GenericOAuthProviderBuilder.(AuthUI.java:1251)
Expected Results:
App should not crash and should open a dialog showing my OIDC provider in a list of sign-in buttons
Relevant Code: