Archived Content from Web3Auth Community
This topic was originally posted by nethaji on 8/15/2024.
This content has been migrated from our previous community forum to preserve valuable discussions.
There is an Exception throwed when trying to get keys using custom JWT with below function, and network is on SAPPHIRE_DEVNET.
@RequiresApi(Build.VERSION_CODES.O)
fun signIn(){
try {
val sub = "2cgkq"
val idToken = "CUSTOM_JWT_TOKEN"
loginParams = LoginParams("test-app", sub, idToken)
torusKey = singleFactorAuth.getKey(
loginParams,
context,
86400
).get()
publicAddress = torusKey?.publicAddress.toString()
Log.d("Web3Auth", """Private Key: ${torusKey?.privateKey?.toString(16)}""".trimIndent())
} catch (e: ExecutionException) {
Log.d("Web3Auth", e.message.toString())
} catch (e: InterruptedException) {
Log.d("Web3Auth", e.message.toString())
}
}
Exception:
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Expected URL scheme 'http' or 'https' but no colon was found