-
SDK Version: 5.3.1
-
Platform: Android
-
Browser Console Screenshots:
-
If the issue is related to Custom Authentication, please include the following information (optional):
- Verifier Name:api-develop-myrenegade
- JWKS Endpoint:https://api-develop.myrenegade.net/.well-known/jwks.json
- Sample idToken (JWT):eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImE1YmJkZDNhMzBjOWJmODY2Njg0ZjY1MWJkIn0.eyJzdWIiOiJkMDUwYjUxMS0yMTRlLTQwZmEtODRhNy1lM2UyNDgzYWRiYjYiLCJuYW1lIjoiVGVzdCBUZXN0IiwiZW1haWwiOiJkYW5pbC5tYWthcmVua28yQGZsZXh5Y2hhaW4uY29tIiwiYXVkIjoiYW5kcm9pZDphcGsta2V5LWhhc2g6RHFqYmhfU1BqZG9TdjdlN0NaY2JqZm1ReS1hLVY4bkVRSDQ2WDhpRm94QSIsImlzcyI6Imh0dHBzOi8vYXBpLWRldmVsb3AubXlyZW5lZ2FkZS5uZXQiLCJpYXQiOjE3MDg1Mjc1MjgsImV4cCI6MTcwODUzMTEyOH0.h1_6TleXQBhd14v3-q47h5BylrJxYIw6SLDBkajD9fVDUlpihZNQDibWTcqtCVhVYJh7DflBfd-1h16Ndf3LuU3-Fv8J4wZypKY5gmFgRjge85yjnICQZTqS0hHXJBjr6WW83pSkARKQ0kYVCCwXwmIJQDm5u1sMBQu6UTFLVzizj34rnCg-9dopWZi_YQlPmuTLmPLLWw6NQrfJCSxqBNk6P0mtTxfC4zD7zrfr2Ag-FGOgtzGjAZGykflyRHwUpjn1BfbrwFeeJsRZOkP6ROD6KE99i7GcxZDtf1CCZ1jkRwt07c2OdSNt1gdBXsLSS00Mg8LjFhLl9i00xDA9SA
Init code
@Singleton
@Provides
fun provideWeb3Auth(
@ApplicationContext context: Context
) = Web3Auth(
Web3AuthOptions(
context = context,
clientId = context.getString(R.string.web3auth_project_id),
network = Network.MAINNET,
redirectUrl = Uri.parse ("${BuildConfig.APPLICATION_ID}://auth"),
// Optional loginConfig object
loginConfig = hashMapOf(
"jwt" to LoginConfigItem(
verifier = "api-develop-myrenegade",
typeOfLogin = TypeOfLogin.JWT,
clientId = context.getString(R.string.web3auth_project_id)
)
)
)
)
Login code
private fun login() {
viewModelScope.launch {
withContext(Dispatchers.IO) {
val token = repository.getWeb3AuthToken()
val login = web3Auth.login(
LoginParams(
loginProvider = Provider.JWT,
extraLoginOptions = ExtraLoginOptions(
id_token = token,
domain = "https://api-develop.myrenegade.net",
verifierIdField = "sub"
)
)
)
val loginResponse = login.await()
}
}
}
So the problem is the following: I don’t get any result from CompletableFuture
It just stucks without any error/result.
Additionally, I’m not sure your Android SDK docs are up to date.
For example, your documentation says redirectUrl is optional, but if I don’t pass it I’m getting the following exception
org.json.JSONException: No value for redirectUrl
Another example is here
Your LoginConfigItem class requires clientId, but it’s not totally clear from your documentation what should I pass here in case of custom jwt login, not Auth0