Hi,
the issue was resolved in version 2.0.1 of web3auth-flutter-sdk, released yesterday, thank you.
Now we can proceed with login, but we are facing another one issue that rise only if we build Android app in release mode.
After the first login, it seems that the private key is no more available on following app accesses and user have to login again: the problem is that the following logins attempts fail with error “Error: Could not get result from torus nodes \n Duplicate token found\n”.
Flow description:
When we start the app, this code is executed:
await Web3AuthFlutter.initialize();
String? privKey = await Web3AuthFlutter.getPrivKey();
if (privKey.isEmpty) {
Web3AuthResponse response = await Web3AuthFlutter.login(LoginParams(
loginProvider: Provider.jwt,
mfaLevel: MFALevel.NONE,
extraLoginOptions: ExtraLoginOptions(
id_token: _auth0IdToken, //this is the id_token obtained via auth0
domain: EnvManager.instance.get("AUTH0_DOMAIN"),
),
));
......
We expect that after the first login, for the following accesses, the function “Web3AuthFlutter.getPrivKey()” return the key, and so no login will be executed.
This works well for iOS and for Android debug mode builds, but not for Android release mode build.
For Android release mode build, the function “Web3AuthFlutter.getPrivKey()” return nothing and the a new login starts, but the attempt fails with error “Error: Could not get result from torus nodes \n Duplicate token found\n”.
Here the full stack trace:
[{"errorMsg":"Could not get result from torus nodes \n Duplicate token found","errorStack":"Error: Could not get result from torus nodes \n Duplicate token found\n at _ (https://testing.openlogin.com/js/callback.323d735c.js:1:13049)\n at Proxy.created (https://testing.openlogin.com/js/callback.323d735c.js:1:33979)","title":"Mount Error","createdAt":"19/7/2023, 10:25:10","info":{"customAuthState":{"client":"BHqSpybvqgSV7l61huog1-qbuVYeX01YekNeZbsdbuOEtUWYIgZaUveSH5eEcqZSvBkRXScL3KCZOHTJnqSkIC0","currentLoginProvider":"jwt","popupWindow":"false","whiteLabel":"{\"logoDark\":\"https://llaminaz.github.io/prova-host-js/logo.png\",\"logoLight\":\"https://xxx.github.io/prova-host-js/logo.png\",\"name\":\"Mine\",\"theme\":{\"primary\":\"#5603AD\"}}","keyMode":"v1","isCustomVerifier":"true","socialFactorFlow":"","loginId":"2043ded62b42b5a8d75175249385930f9303331137be3be38eca64da57b8dc9a","sessionNamespace":"","version":"4","instanceId":"iuld4rjlhdo","verifier":"mine-auth0-custom-verifier","typeOfLogin":"jwt","redirectToOpener":false},"customAuthArgs":{"typeOfLogin":"jwt","verifier":"mine-auth0-custom-verifier","clientId":"M6SAscZUzfF3FhRiKab3zRPgOI2ahPP2","jwtParams":{"additionalParams":{},"domain":"dev-mfyz8fafu4bi85pm.eu.auth0.com","id_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Iml6cFBtMUNOb0c4MjNpOUR1VUhRNCJ9.eyJuaWNrbmFtZSI6ImZhYmlvLnRhZGluaSIsIm5hbWUiOiJmYWJpby50YWRpbmlAeW91dGhxdWFrZS5pdCIsInBpY3R1cmUiOiJodHRwczovL3MuZ3JhdmF0YXIuY29tL2F2YXRhci8wOGQxZDBiZWIzNDY5MTcwNmFlOGQwNDZlMTU3NjlkNT9zPTQ4MCZyPXBnJmQ9aHR0cHMlM0ElMkYlMkZjZG4uYXV0aDAuY29tJTJGYXZhdGFycyUyRmZhLnBuZyIsInVwZGF0ZWRfYXQiOiIyMDIzLTA3LTE4VDE1OjI0OjI2Ljg3MloiLCJlbWFpbCI6ImZhYmlvLnRhZGluaUB5b3V0aHF1YWtlLml0IiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImlzcyI6Imh0dHBzOi8vZGV2LW1meXo4ZmFmdTRiaTg1cG0uZXUuYXV0aDAuY29tLyIsImF1ZCI6Ik02U0FzY1pVemZGM0ZoUmlLYWIzelJQZ09JMmFoUFAyIiwiaWF0IjoxNjg5NzU1MDgyLCJleHAiOjE2ODk3OTEwODIsInN1YiI6ImF1dGgwfDY0M2MyZTljZmNhMTVjMzUxOGM2YTdhYiIsInNpZCI6IlF4WHVyc01hTVFEN3hnUlBCUXVfeTktSFRQZjlnbVJHIiwibm9uY2UiOiI1c2xwZ2lxMmY1cFBvN3dYMm1wcWlSR0NaXzlHcnl1U2M5MnZ6R2RYS1pjIn0.deUFqe0fD_xr5U3Fce5dkP2_pSwB814F3TiFMymfq4PEelndB0TW5XgqHqjqE74uqe7l3JLlTWiA7FK2APnlp6TAeayKsMDLlo9hDP4ntruTPxWVM5ORWcx3qu8CfYPbqzVZTj0Ld_huPxY00HYqXLKUtc5R6OitYeB4eNveXp6wTqhJEkkASBl_9rIdwWVM9ZGmevWYRqflhpl4hSIIWDKtCzyzT1JLTfrtKre92G4Gy_KnjHRvJnBCutL4sR8sCUzrtJmeSYRPw60NKY3tDMJNA3NOFWI8sOyjrfec1AIlxMCKV0NDL7mkTCm3O9-q7jnSo8yAA5PazQIIvcjjsg"},"customState":{"client":"BHqSpybvqgSV7l61huog1-qbuVYeX01YekNeZbsdbuOEtUWYIgZaUveSH5eEcqZSvBkRXScL3KCZOHTJnqSkIC0","currentLoginProvider":"jwt","popupWindow":"false","whiteLabel":"{\"logoDark\":\"https://llaminaz.github.io/prova-host-js/logo.png\",\"logoLight\":\"https://xxx.github.io/prova-host-js/logo.png\",\"name\":\"Mine\",\"theme\":{\"primary\":\"#5603AD\"}}","keyMode":"v1","isCustomVerifier":"true","socialFactorFlow":"","loginId":"2043ded62b42b5a8d75175249385930f9303331137be3be38eca64da57b8dc9a","sessionNamespace":"","version":"4"},"hash":"state=eyJjbGllbnQiOiJCSHFTcHlidnFnU1Y3bDYxaHVvZzEtcWJ1VlllWDAxWWVrTmVaYnNkYnVPRXRVV1lJZ1phVXZlU0g1ZUVjcVpTdkJrUlhTY0wzS0NaT0hUSm5xU2tJQzAiLCJjdXJyZW50TG9naW5Qcm92aWRlciI6Imp3dCIsInBvcHVwV2luZG93IjoiZmFsc2UiLCJ3aGl0ZUxhYmVsIjoie1wibG9nb0RhcmtcIjpcImh0dHBzOi8vbGxhbWluYXouZ2l0aHViLmlvL3Byb3ZhLWhvc3QtanMvbG9nby5wbmdcIixcImxvZ29MaWdodFwiOlwiaHR0cHM6Ly9sbGFtaW5hei5naXRodWIuaW8vcHJvdmEtaG9zdC1qcy9sb2dvLnBuZ1wiLFwibmFtZVwiOl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LyIsImF1ZCI6Ik02U0FzY1pVemZGM0ZoUmlLYWIzelJQZ09JMmFoUFAyIiwiaWF0IjoxNjg5NzU1MDgyLCJleHAiOjE2ODk3OTEwODIsInN1YiI6ImF1dGgwfDY0M2MyZTljZmNhMTVjMzUxOGM2YTdhYiIsInNpZCI6IlF4WHVyc01hTVFEN3hnUlBCUXVfeTktSFRQZjlnbVJHIiwibm9uY2UiOiI1c2xwZ2lxMmY1cFBvN3dYMm1wcWlSR0NaXzlHcnl1U2M5MnZ6R2RYS1pjIn0.deUFqe0fD_xr5U3Fce5dkP2_pSwB814F3TiFMymfq4PEelndB0TW5XgqHqjqE74uqe7l3JLlTWiA7FK2APnlp6TAeayKsMDLlo9hDP4ntruTPxWVM5ORWcx3qu8CfYPbqzVZTj0Ld_huPxY00HYqXLKUtc5R6OitYeB4eNveXp6wTqhJEkkASBl_9rIdwWVM9ZGmevWYRqflhpl4hSIIWDKtCzyzT1JLTfrtKre92G4Gy_KnjHRvJnBCutL4sR8sCUzrtJmeSYRPw60NKY3tDMJNA3NOFWI8sOyjrfec1AIlxMCKV0NDL7mkTCm3O9-q7jnSo8yAA5PazQIIvcjjsg","queryParameters":{}},"customAuthError":"Could not get result from torus nodes \n Duplicate token found","customAuthHashParams":{"state":"eyJjbGllbnQiOiJCSHFTcHlidnFnU1Y3bDYxaHVvZzEtcWJ1VlllWDAxWWVrTmVaYnNkYnVPRXRVV1lJZ1phVXZlU0g1ZUVjcVpTdkJrUlhTY0wzS0NaT0hUSm5xU2tJQzAiLCJjdXJyZW50TG9naW5Qcm92aWRlciI6Imp3dCIsInBvcHVwV2luZG93IjoiZmFsc2UiLCJ3aGl0ZUxhYmVsIjoie1wibG9nb0RhcmtcIjpcImh0dHBzOi8vbGxhbWluYXouZ2l0aHViLmlvL3Byb3ZhLWhvc3QtanMvbG9nby5wbmdcIixcImxvZ29MaWdodFwiOlwiaHR0cHM6Ly9sbGFtaW5hei5naXRodWIuaW8vcHJvdmEtaG9zdC1qcy9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