Archived Content from Web3Auth Community
This topic was originally posted by githubdiscussions on 10/24/2022.
This content has been migrated from our previous community forum to preserve valuable discussions.
Hi there, I'm trying to use my Firebase JWT token id to create a user and wallet with Web3Auth in Flutter (Custom Authentication).
(By the way, I needed to use jwt-login-fixes branch to be able to reach to this point. With the master branch I just got a blank screen with the Web3Auth logo at the bottom of the page without reconstructing the private key message and spinner)
I think I've done everything based on the documents and guides but I received this error when Web3Auth is trying to reconstruct the private-key.
Tested device: Samsung Galaxy S20
Android version: 12
There seems to be some bug in the code. Please contact support to fix this.Your system time is incorrect. Please correct your system time and login again"
Also sometimes I get this error instead of the above message (with the same code!):
Unable to detect login share from the Auth Network. This may be due to slow internet connection. Check your internet speed and try again.
The errors that I got were exactly the same as this one:
https://github.com/Web3Auth/web3auth-web/discussions/515#discussioncomment-3624987
Could you please let me know what is the issue?
This is my code in Flutter:
}">
if (Platform.isAndroid) {
redirectUrl = Uri.parse(āw3a://com.example.w3aflutter/authā);
} else if (Platform.isIOS) {
redirectUrl = Uri.parse(ācom.example.w3aflutter://openloginā);
} else {
throw UnKnownException(āUnknown platformā);
}final loginConfig = HashMap<String, LoginConfigItem>();
loginConfig[ājwtā] = LoginConfigItem(
verifier: āverifier_nameā,
typeOfLogin: TypeOfLogin.jwt,
name: āCustom JWT Loginā,
clientId: āThe_web3auth_dashboard_client_idā,
);await Web3AuthFlutter.init(Web3AuthOptions( clientId: "The_web3auth_dashboard_client_id", network: Network.cyan, redirectUrl: redirectUrl, whiteLabel: WhiteLabelData( dark: true, name: "Web3Auth Flutter App", theme: themeMap), loginConfig: loginConfig ),);
Future<Web3AuthResponse> _withJWT() {
return Web3AuthFlutter.login(LoginParams(
loginProvider: Provider.jwt,
extraLoginOptions: ExtraLoginOptions(
verifierIdField: āsubā,
response_type: ātokenā,
id_token: idToken, //Received from firebase login
domain: āhttp://localhost:3000ā)));
}
Originally posted by: iNima
Check the discussion at: https://github.com/orgs/Web3Auth/discussions/757