AWS Cognito Refresh token is not happening

Viewed 135

I am using AWS Cognito via AWSMobileClient in the Android app, and every time when the app is launched I check for valid AWS token, but the app is stuck on splash.

I checked the logs and saw that AWS refresh token is the dead end, there are no logs after the fetching of token refresh line

private fun getAWSToken() : String {
    Sentry.capture("AWS token")
    return try {
        Sentry.capture("AWS token try")
        val token = AWSMobileClient.getInstance()?.tokens?.accessToken?.tokenString
        return if (token == null) {
            Sentry.capture("AWS token is nulled")
            ""
        } else {
            Sentry.capture("AWS token found")
            token
        }
    } catch (e: Exception) {
        Sentry.capture("AWS token try failed")
        Sentry.capture(e)
        ""
    }

}

After AWS token try there are no logs, am I missing something or incorrectly using the library?

0 Answers
Related