Passwordless Login using Lock.Android MagicLink fails

I am trying to make passwordless login work using Lock.Android.

I have this basic setup here:

PasswordlessLock.newBuilder(account, object : AuthenticationCallback() {
            override fun onAuthentication(credentials: Credentials) {
               ...
            }

            override fun onError(error: AuthenticationException) {
                ...
            }
        }).withScheme(scheme)
            .withScope("openid profile email")
            .closable(true)
            .rememberLastLogin(true)
            .useLink()
            .build(context)

I followed this guide here.

When I try to login, enter my email > press next > wait for email > press the link in the email, it redirects back to my app but its throwing an error:

Failed to authenticate the user: An error occurred when trying to authenticate with the server.
             com.auth0.android.authentication.AuthenticationException: An error occurred when trying to authenticate with the server.
                                 at com.auth0.android.authentication.AuthenticationAPIClient$Companion$createErrorAdapter$1.fromJsonResponse(AuthenticationAPIClient.kt:801)
                                 at com.auth0.android.authentication.AuthenticationAPIClient$Companion$createErrorAdapter$1.fromJsonResponse(AuthenticationAPIClient.kt:786)
                                 at com.auth0.android.request.internal.BaseRequest.execute(BaseRequest.kt:113)
                                 at com.auth0.android.request.internal.BaseRequest.start$lambda-2(BaseRequest.kt:68)
                                 at com.auth0.android.request.internal.BaseRequest.$r8$lambda$uH6X7wIol62Lzts5fbwoUeRDLU4(Unknown Source:0)
                                 at com.auth0.android.request.internal.BaseRequest$$ExternalSyntheticLambda0.run(Unknown Source:4)
                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
                                 at java.lang.Thread.run(Thread.java:1012)

Hope I could get some guidance on this.