Issue with Okta Android SDK

Hello,

I am currently using the android sample SDK app added here : https://github.com/okta/samples-android/ ( for native sign in test).

I am facing a couple of issues regarding my active dev account. My dev account details:

Redirect_uri : (starts with https://mycompanyname.com )

My test account :

Redirect_uri : (starts as : com.okta.dev-402918:/callback)

buildConfigField( “String” , “BASE_URL” , " " https://dev-402918.okta.com/ " " ) //""https://dev-402918.okta.com/"")
manifestPlaceholders = [
hostName : " " ,
"appAuthRedirectScheme" : “com.okta.dev-402918”
]

However, I am unsure as to how to replace my test account details with my active dev account details so as to replace : com.okta.dev-402918 withhttps://mycompanyname.com etc.,

It doesn’t seem to work when I replace the details, not sure what part is missing or what I am doing wrong. Any idea?

Thanks!

Hi Veran,

The “appAuthRedirectScheme” is not tied to your account details so it doesn’t need to be " https://mycompanyname.com. You should use your applications package name.

For example if your applications package name is com.foo.bar. you can put the redirect scheme as
manifestPlaceholders = [
hostName : " " ,
"appAuthRedirectScheme" : “com.foo.bar”
]

In your orgs login and logout redirect uri you can set it to the following
com.foo.bar:/login
com.foo.bar:/logout

In the sample the config.json you have to make sure the “discovery_uri” is set to the auth server you are using. In your case it should be https://mycompanyname.com for your active dev account.

I tried this, but still didn’t have any luck. It keeps trying to authenticate infinitely. Wonder whats missing

Hi Veran if it is authenticating infinitely, check the logs for any IllegalArgumentExceptions. This usually happens when the config is not setup correctly.

Use BASE_URL https://dev-402918.okta.com without / at the end of URL.