Skip to content

Feature request: Support any OpenID Connect Provider #2131

@alex-kor

Description

@alex-kor

environment

  • Android device: Google Pixel 4 XL
  • Android OS version: 13
  • Google Play Services version: 20.3.0
  • Firebase/Play Services SDK version: 4.3.15
  • FirebaseUI version: 8.0.2

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:

  1. Create a Firebase project
  2. Add Authentication with Google
  3. Add OIDC provider as a sign in method
  4. On Android Platform try to create a list of providers using GenericOAuthProviderBuilder
  5. Observe the crash

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:

val providers = arrayListOf(
      AuthUI.IdpConfig.GoogleBuilder().build(),
      AuthUI.IdpConfig.GenericOAuthProviderBuilder("oidc.provider-id","provider-name", R.layout.oidc_button).build()
  )
  val signInIntent = AuthUI.getInstance()
      .createSignInIntentBuilder()
      .setAvailableProviders(providers)
      .build()
val firebaseSignInLauncher = rememberLauncherForActivityResult(
      contract = FirebaseAuthUIActivityResultContract(),
      onResult = {
          onFirebaseUiLogin(it.idpResponse)
      }
  )

... later in a code ...
firebaseSignInLauncher.launch(signInIntent)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions