Verifier Name:“hzm-edge-test”
Hi guys, I use SFAExample to test full process, code as following:
val idToken = JwtUtils.generateIdToken(TORUS_TEST_EMAIL)
sfaParams = SFAParams(Web3AuthNetwork.SAPPHIRE_DEVNET, "BM3fzH-l6pgCO9YSmpmHC9k1jQ080ckmr0rgVjsEPa_kZ1xnMSB33vPCZGjjyt8xAjtBpLUJoYzVbPrgI6wEExI", 86400, null, 0)
singleFactorAuth = SingleFactorAuth(sfaParams, this)
val idToken = JwtUtils.generateIdToken(TORUS_TEST_EMAIL)
loginParams = LoginParams(TEST_VERIFIER, TORUS_TEST_EMAIL, idToken)
val sfakey = singleFactorAuth.connect(loginParams, this.applicationContext)
if (sfakey != null) {
val text = "Public Address: ${sfakey.getPublicAddress()} , Private Key: ${sfakey.getPrivateKey()}"
tv.text = text
}
if TEST_VERIFIER = “torus-test-health”, it’s work well, can get correct key infromation.
But if TEST_VERIFIER = “hzm-edge-test”, which verifier was created by myself in the Custom Authentication, it will fail, error as follow:
Caused by: retrieve or import share failed
at org.torusresearch.torusutils.helpers.NodeUtils.retrieveOrImportShare(NodeUtils.java:318)
at org.torusresearch.torusutils.TorusUtils.retrieveShares(TorusUtils.java:131)
at com.web3auth.singlefactorauth.SingleFactorAuth.getTorusKey(SingleFactorAuth.kt:114)
at com.web3auth.singlefactorauth.SingleFactorAuth.connect(SingleFactorAuth.kt:122)
at com.web3auth.sfaexample.MainActivity.getSFAKey(MainActivity.kt:60)
Looking forward to your reply!
Thank a lot firstly
Thank you for reaching out with your question! It seems you’re encountering an issue while using the SFA Android SDK for custom authentication with your verifier “hzm-edge-test.”
Here’s a summary of the details you provided that our support team will need:
SDK Details: SFA Android SDK
SDK Version: SFA
Platform: Android
Verifier Name: “hzm-edge-test”
Code Snippet:
You shared the following code:
val idToken = JwtUtils.generateIdToken(TORUS_TEST_EMAIL)
sfaParams = SFAParams(Web3AuthNetwork.SAPPHIRE_DEVNET, "BM3fzH-l6pgCO9YSmpmHC9k1jQ080ckmr0rgVjsEPa_kZ1xnMSB33vPCZGjjyt8xAjtBpLUJoYzVbPrgI6wEExI", 86400, null, 0)
singleFactorAuth = SingleFactorAuth(sfaParams, this)
val idToken = JwtUtils.generateIdToken(TORUS_TEST_EMAIL)
loginParams = LoginParams(TEST_VERIFIER, TORUS_TEST_EMAIL, idToken)
val sfakey = singleFactorAuth.connect(loginParams, this.applicationContext)
Error Message:
The error message indicates a failure with the retrieveOrImportShare method.
Proposed Solution:
Could you please check the following?
Ensure that the verifier “hzm-edge-test” has been properly set up in your Custom Authentication.
Double-check the login parameters being passed when using your custom verifier.
If the issue persists, could you also provide:
A screenshot of any relevant browser console errors or logs.
Any additional information on how the custom verifier “hzm-edge-test” was created.
This information will help our team in diagnosing the problem further. We appreciate your patience, and we’re here to help!
Looking forward to your reply! Thank you!
Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.
The verifier you created is of the Email_Passwordless type. Unfortunately, the SFA SDK won’t work simply by changing the verifier name. The TORUS_TEST_EMAIL uses a verifier that is of custom verifier type, where the JWT is generated during the request and then provided to the SFA SDK to continue the login process.
Could you please share your use case and what you are trying to implement?