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
What service are you using?
aws-android-sdk-cognitoauth
In what version of SDK are you facing the problem?
'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.6.+'
'com.amazonaws:aws-android-sdk-cognitoauth:2.6.17@aar'
Is the issue limited to Simulators / Actual Devices?
It reproduced on both Simulators and device.
Is this problem related to specific Android/OS version?
No
Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem.
Expected result: isAuthenticated() return true;
Actual result: isAuthenticated() is always false, even after successfully login.
In SDK source code in the class AuthClient I’ve found that for caching session for key clientId
is using pool.getAppId(). In the getSession() method in same class is also used pool.getAppId() for get cached session. But in isAuthenticated() method in same class value of pool.getAppWebDomain() is using as a clientId:
public class AuthClient {
...
public boolean isAuthenticated() {
AuthUserSession session =
LocalDataManager.getCachedSession(context, pool.getAppWebDomain(), userId, pool.getScopes());
return session.isValidForThreshold();
}
...
protected void getSession() {
...
// Look for cached tokens
AuthUserSession session =
LocalDataManager.getCachedSession(context, pool.getAppId(), userId, pool.getScopes());
...
}
...
private void refreshSession(final AuthUserSession session,
final String redirectUri,
final Set<String> tokenScopes,
final AuthHandler callback) {
new Thread(new Runnable() {
...
// Cache session
LocalDataManager.cacheSession(context, pool.getAppId(), username, refreshedSession, pool.getScopes());
...
}
Because session parameters were cached by one key and requesting them by another isAuthenticated always return false. Is this a bug?
Thanks!
The text was updated successfully, but these errors were encountered:
What service are you using?
aws-android-sdk-cognitoauth
In what version of SDK are you facing the problem?
'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.6.+'
'com.amazonaws:aws-android-sdk-cognitoauth:2.6.17@aar'
Is the issue limited to Simulators / Actual Devices?
It reproduced on both Simulators and device.
Can your problem be resolved if you bump to a higher version of SDK?
This is the latest version which is recommended in the documentation https://docs.aws.amazon.com/aws-mobile/latest/developerguide/how-to-android-sdk-setup.html
Is this problem related to specific Android/OS version?
No
Can you give us steps to reproduce with a minimal, complete, and verifiable example? Please include any specific network conditions that might be required to reproduce the problem.
this.auth.isAuthenticated()
;Expected result:
isAuthenticated()
return true;Actual result:
isAuthenticated()
is always false, even after successfully login.In SDK source code in the class
AuthClient
I’ve found that for caching session for keyclientId
is using
pool.getAppId()
. In thegetSession()
method in same class is also usedpool.getAppId()
for get cached session. But inisAuthenticated()
method in same class value of pool.getAppWebDomain() is using as a clientId:Because session parameters were cached by one key and requesting them by another isAuthenticated always return false. Is this a bug?
Thanks!
The text was updated successfully, but these errors were encountered: