You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found my app failing to authenticate, and the root cause was that SecureCredentialsManager was giving me a JWT that was expired.
The credentials object had accessToken with an expiration from earlier today, but expiresAt has an expiration of tomorrow. So my custom authorizer for AWS API Gateway fails, as it's validating the JWT.
Reproduction
I don't know how to reproduce this. This did happen after I crossed the international date line in an eastward direction, but I don't know if that caused it.
Additional context
Perhaps the library aught to parse the JWT and validate that it isn't expired? Or figure out why the expiration times came to be different.
This is my original login code.
WebAuthProvider.login(AuthConstants.AUTH0_ACCOUNT)
.withScheme("focalist")
.withScope("openid profile email offline_access")
.withAudience("https://ez672wgm73.execute-api.us-east-2.amazonaws.com")
.start(this, object : Callback<Credentials, AuthenticationException> {
override fun onFailure(error: AuthenticationException) {
logger.error("Login failed", error)
}
override fun onSuccess(result: Credentials) {
val storage = CredentialStorage.getInstance(this@MainActivity)
storage.saveCredentials(result)
logger.info("Sign in succeeded")
loadOrReloadWebView()
}
})
That CredentialStorage wraps SecureCredentialsManager, and I call saveCredentials and getCredentials on it.
Auth0.Android version
2.11.0
Android version(s)
13
The text was updated successfully, but these errors were encountered:
Checklist
Description
I found my app failing to authenticate, and the root cause was that SecureCredentialsManager was giving me a JWT that was expired.
The credentials object had
accessToken
with an expiration from earlier today, butexpiresAt
has an expiration of tomorrow. So my custom authorizer for AWS API Gateway fails, as it's validating the JWT.Reproduction
I don't know how to reproduce this. This did happen after I crossed the international date line in an eastward direction, but I don't know if that caused it.
Additional context
Perhaps the library aught to parse the JWT and validate that it isn't expired? Or figure out why the expiration times came to be different.
This is my original login code.
That CredentialStorage wraps SecureCredentialsManager, and I call saveCredentials and getCredentials on it.
Auth0.Android version
2.11.0
Android version(s)
13
The text was updated successfully, but these errors were encountered: