auth0-samples / auth0-android-sample

Auth0 Integration Samples for Android Applications
https://auth0.com/docs/quickstart/native/android
MIT License
77 stars 141 forks source link

string value in manifestPlaceholders not working #94

Closed amindadgar closed 3 years ago

amindadgar commented 3 years ago

Describe The Problem Hi, Recently I added Auth0 to my project and after doing everything step by step I got a problem. The problem is while I use my Auth0 domain as string value in manifestPlaceholders, I cannot redirect to the application. manifestPlaceholders is like below

defaultConfig {
        applicationId "com.amindadgar.myApplicationId"
        minSdkVersion 24
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        // Here my auth0Domain is a string value --> not working
        manifestPlaceholders = [auth0Domain: "@strings/com_auth0_domain", auth0Scheme: "demo"]
    }

How it Works? After making the auth0Domain hardcoded, The library worked perfectly and I could redirect to my application. ( like below )

defaultConfig {
        applicationId "com.amindadgar.myApplicationId"
        minSdkVersion 24
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        // Here my auth0Domain is Hardcoded --> Working with no problem !!
        manifestPlaceholders = [auth0Domain: "Example-Domain", auth0Scheme: "demo"]
    }

The Question Why I cannot use string resource in manifestPlaceholders ( Or why it's not working with string value )?

Additional information The Application builds with no problem and no errors occurred. Just while using string resource as manifestPlaceholders the login page is freezed after filling username and password and pressing the login( or signing in with google account ), Just the loading bar is moving.

Any help would be appreciated

amindadgar commented 3 years ago

The problem was solved. It was my problem that I used wrong domain in string resources.