Auth0 Home Blog Docs

An error occurred when trying to authenticate with the server

login

#1

I’m trying to implement the Auth0 android SDK, unfortunatly i’ve got an error wich i dont know how to fix:

The application isn't configured properly for the social connection. Please check your Auth0's application configuration

a0.invalid_configuration

I’ve downloaded the demo api (wich is configured with the correct datas) and got same error.

Thanks


#2

Can you share with us your connection code, minus any sensitive data, so that we can help troubleshoot what is going on? Also you can DM me your tenant.


#3

I’ve tried every possibile connection settings…

This is what i am using at the moment:

Auth0 auth0 = new Auth0(this);
    auth0.setOIDCConformant(true);

    WebAuthProvider.init(auth0)
            .withScheme("M_CUSTOM_SCHEME")
            .withAudience(String.format("https://%s/userinfo", getString(R.string.com_auth0_domain)))
            .start(LoginActivity.this, new AuthCallback() {
                @Override
                public void onFailure(@NonNull Dialog dialog) {
                    String stopme = "";
                    }

                @Override
                public void onFailure(AuthenticationException exception) {
                    //This is where it fails giving those messages.
                    String stopme = "";
                }

                @Override
                public void onSuccess(@NonNull Credentials credentials) {
                    String stopme = "";
                }
            });

#6

:wave: @LinkOut what Auth0 SDK Android version are you using? What social connection did you setup? For example, with Google the steps to follow are outlined here. Can you let me know which one you are using and that you setup the connection correctly?

And in your app/build.gradle file did you add the Auth0 Scheme property which is going to be used internally by the library to register an intent-filter that captures the callback URI? If so, what did you set the scheme as?


#7

Hi there Kim,

Auth0 SDK Android version: implementation 'com.auth0.android:auth0:1.+'
I’ve also tested : 1.13.2 instead of 1.+

Actually i’m not using any social connection, so noone of the availlable social connections are setted up.

And yes, i’ve correctly setted up the app/build.gradle file, since i’m getting the error in the callback.

Here is the configuration: manifestPlaceholders = [auth0Domain: "@string/com_auth0_domain", auth0Scheme: "M_CUSTOM_SCHEME"]


#8

Thank you for providing that information! In manage.auth0.com, under Applications > the application we are using > and under the Connections tab, do you have Username-Password-Authentication enabled under Database ? And can you check to make sure there are no options enabled under Social? The a0.invalid_configuration error message is invoked when a Social Provider Configuration is invalid so this suggests that a social connection may be enabled by accident.


#9

Here is what i see under the Connections tab of the current application i’m using.


#10

Is this a custom database connection you created?

And so you are still receiving a The application isn't configured properly for the social connection. error? Would it be possible for you to capture a HAR file so I can take a closer look?


#11

I dont think it is a custom connection.

I’m not able to provide you the HAR file, since we are talking about an Android application.

And yes, i still got the same error.


#12

Any news on how to fix this issue?


#13

@LinkOut do you have in your application settings the Allowed Callback URLs a URL with the following format:

https://YOUR_AUTH0_DOMAIN/android/{YOUR_APP_PACKAGE_NAME}/callback

(reference: https://auth0.com/docs/libraries/auth0-android#authentication-via-universal-login
)

It could be due to a mismatch in the callback URL


#14

Hi @kim.noel Yes, i do have the correct callback URL, othwerwise i m getting an error from the openend page wich tells me that the url is missmatch.


#15

Hello, any help on this?


#16

@LinkOut I wasn’t able to reproduce the issue. Would it be possible for you to share the project that reproduces it so we can take a look? Please feel free to DM me the project if it’s either github repo, dropbox, or other.