okta / samples-android

samples-android
https://github.com/okta/samples-android
Apache License 2.0
37 stars 52 forks source link

Facing Issue with Google Integration using IDP returning error "identity provider is not valid" #72

Closed kirtipopli83 closed 2 years ago

JayNewstrom commented 2 years ago

Hi @kirtipopli83 could you give us a little more information about your setup? Is there a stack trace?

kirtipopli83 commented 2 years ago

This is my config file setup parameters: { "client_id": "", "redirect_uri": "", "end_session_redirect_uri": "", "scopes": [ "openid", "profile", "offline_access" ], "discovery_uri": "" }

Along with it, I am using google integration using Idp and I am using Android SDK, which I am using to initialize the web Authentication Client.

Like this: val mOIDCConfig = OIDCConfig.Builder() .withJsonFile(context, oKTAOIDCConfigFile) .create() localAuth = Okta.AuthBuilder() .withConfig(mOIDCConfig) .withContext(context.applicationContext) .withStorage(SharedPreferenceStorage(context)) .setCacheMode(false) .setRequireHardwareBackedKeyStore(false) .withEncryptionManager(mEncryptionManager) .create() mAuth = localAuth

Using web Auth Client calling Api from SDK

mPayload = AuthenticationPayload.Builder().setIdp("").build() getWebAuth()?.signIn(context, mPayload)

For privacy purpose I have not provided the values, Can we discuss this over mail, so can provide you the details?

JayNewstrom commented 2 years ago

If you need direct support, please reach out to our support team https://support.okta.com/

Your configuration looks fine. Are you passing the IdP param according to the documentation? https://developer.okta.com/docs/reference/api/oidc/#authorize

If you have a stack trace that would be great too.

kirtipopli83 commented 2 years ago

Issue is fixed, it was IDP param was taking from dev environment. Thanks.