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