Lock.Android icon indicating copy to clipboard operation
Lock.Android copied to clipboard

Social Login with Google returns 404

Open jamesjmtaylor-evercharge opened this issue 2 years ago • 5 comments

Checklist

  • [X] I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • [X] I have looked into the API documentation and have not found a suitable solution or answer.
  • [X] I have searched the issues and have not found a suitable solution or answer.
  • [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • [X] I agree to the terms within the Auth0 Code of Conduct.

Description

I'm attempting to integrate the lock SDK for our Android app. I have the following settings:

    private fun showClassicLock() {
        val builder = Lock.newBuilder(account, callback)
            .withScheme("https")
            .withAudience("https://apitest.cove.evercharge.com")
            .withScope("openid profile offline_access email")
            .allowedConnections(listOf("google-oauth2"))
            .withAuthenticationParameters(
                mapOf(
                    "prompt" to "select_account",
                )
            )


        // For demo purposes because options change dynamically, we release the resources of Lock here.
        // In a real app, you will have a single instance and release its resources in Activity#OnDestroy.
        lock?.onDestroy(this)
        // Create a new instance with the updated configuration
        lock = builder.build(this)
        startActivity(lock!!.newIntent(this))
    }

After selecting my google account I get the following screen

Screenshot 2023-11-10 at 8 23 30 AM

What I expected to happen was to have the LockCallback.onAuthentication triggered.

Reproduction

  1. Clone the repository at https://github.com/auth0/Lock.android/blob/main/EXAMPLES.md#examples-using-lockandroid
  2. Update audience, scheme, clientId, appid, and domain based off of the Native Application in our Auth0 console.
  3. Update the builder with the parameters in the description.
  4. Run the app.
  5. Trigger social login
  6. Select an account
  7. Complete login

Expected: LockCallback.onAuthentication triggered. Actual: 404 page is shown

This occurs consistently.

Additional context

No response

Lock.Android version

3.2.2

Android version(s)

14

@jamesjmtaylor-evercharge Looks like you have not placed the value of the your auth0 domain in your build.gradle file.

Are you using just Web Authentication? Then you are better using Auth0.Android.

This issue is happening because you have already logged in but the redirection back to the app is not working properly. If you clear the cookies you will see the login page again but after successful login you will see this page as the redirection back to the app is not happening properly

poovamraj avatar Nov 13 '23 12:11 poovamraj

The relevant portion of our build.gradle file is below:

    defaultConfig {
        applicationId "com.evercharge.sauce.staging"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        manifestPlaceholders = [auth0Domain: "@string/com_auth0_domain", auth0Scheme: "https"]
    }

We are using Web Authentication (which works), but we're trying to move to an in-app login with Lock (which doesn't).

It's not a cookie issue. I've tried clearing cookies, as well as completely wiping the device. I still get a 404.

jamesjmtaylor-dexcom avatar Nov 13 '23 18:11 jamesjmtaylor-dexcom

Can you use Chrome's device inspector and try to get the error message from the console when opening the web authentication?

poovamraj avatar Nov 14 '23 11:11 poovamraj

Same thing, 404 (Not Found). Screenshot 2023-11-14 at 7 38 28 AM Screenshot 2023-11-14 at 7 34 32 AM

jamesjmtaylor-dexcom avatar Nov 14 '23 15:11 jamesjmtaylor-dexcom

Any updates on this issue? We are seeing this as well, on an intermittent basis. On OS30 and OS29 image

cfrank19 avatar Nov 22 '24 20:11 cfrank19