Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social Login with Google returns 404 #663

Open
5 tasks done
jamesjmtaylor-evercharge opened this issue Nov 10, 2023 · 4 comments
Open
5 tasks done

Social Login with Google returns 404 #663

jamesjmtaylor-evercharge opened this issue Nov 10, 2023 · 4 comments
Labels
bug This points to a verified bug in the code

Comments

@jamesjmtaylor-evercharge
Copy link

jamesjmtaylor-evercharge commented Nov 10, 2023

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • 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 jamesjmtaylor-evercharge added the bug This points to a verified bug in the code label Nov 10, 2023
@poovamraj
Copy link
Contributor

@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

@jamesjmtaylor-dexcom
Copy link

jamesjmtaylor-dexcom commented Nov 13, 2023

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.

@poovamraj
Copy link
Contributor

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

@jamesjmtaylor-dexcom
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

3 participants