[Archive] Login fail incase Using Provider.EMAIL_PASSWORDLESS mode

:classical_building: Archived Content from Web3Auth Community

This topic was originally posted by phanhug.93 on 7/4/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.


Please provide the following details too when asking for help in this category:

Please provide the Web3Auth initialization and login code snippet below:

 web3Auth.login(
                    LoginParams(
                        Provider.EMAIL_PASSWORDLESS,
                        extraLoginOptions = ExtraLoginOptions(login_hint = email)
                    )
                ).whenComplete { loginResponse, error ->
                    if (error == null) {
                        println(loginResponse)
                        reRender(loginResponse)
                    } else {
                        Log.d(LoginWeb3Activity.toString(), error.message ?: "Something went wrong")
                    }
                }

@phanhug.93 Thanks for your post.

Can you disable the Google translate plugin and try hard refreshing the redirect page? In the meantime, I will forward your issue to our team and get back with further updates.

I tried hard refreshing the direct page. After that i see other message.

354411670_169051079502697_2555699670905096633_n
354411670_169051079502697_2555699670905096633_n900Ă—1930 32.1 KB

@vjgee thanks for your supporting

Could try whitelisting auth.openlogin.com in your browser setting and ensure the browser settings are as documented in this article:

I add auth.openlogin.com to whitelisting of Chrome but issue still occur

@phanhug.93 Please share browser console logs. Also have you tried example app within sdk itself?

I plug sdk on android mobile device. How i can get browser console logs?

By using chrome://inspect/#devices in Google chrome

With example app every things still work well

can you try getting logs on clicking “!” icon button on “Something went wring” screen.

image
image1920Ă—1135 124 KB

my console log

@archit Pls look into above there is some API issue.

@phanhug.93 Pls share passwordless/start API payload and response?

Payload

image
image1920Ă—1247 159 KB

Response

image
image1920Ă—1247 165 KB

I tried change config web3auth of example app to same as my project

     web3Auth = Web3Auth(
            Web3AuthOptions(
                context = this,
                clientId = getString(R.string.web3auth_project_id), // pass over your Web3Auth Client ID from Developer Dashboard
                network = Network.MAINNET, // pass over the network you want to use (MAINNET or TESTNET or CYAN)
                redirectUrl = Uri.parse("${applicationsId}://auth"), // your app's redirect URL
                whiteLabel = WhiteLabelData(
                    "Web3Auth ${getString(R.string.app_name)}", null, null, "en", false
                ),
                loginConfig = hashMapOf(
                    "loginConfig" to LoginConfigItem(
                        "torus",
                        typeOfLogin = TypeOfLogin.GOOGLE,
                        name = ""
                    )
                )
            )
        )

Mainifest config:

 <activity
            android:name=".ui.login.LoginWeb3Activity"
            android:exported="true"
            android:launchMode="singleTop"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;category android:name="android.intent.category.BROWSABLE" /&gt;

            &lt;data android:scheme="${applicationId}" /&gt;
        &lt;/intent-filter&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.VIEW" /&gt;

            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;category android:name="android.intent.category.BROWSABLE" /&gt;

            &lt;data android:scheme="web3auth" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;

Issue still occur

hi @phanhug.93, pls show the response body

image
image1323Ă—1049 171 KB

Hi @phanhug.93, pls share the screenshot of the API network response body from the network tab. The response body above is not in a readable format.

image
image1512Ă—897 119 KB

I think issue occur is my mistake when config whitelabel with defaultLanguage is 'vi" (not support).
I will test one more to close topic. Thanks for all.