Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1733. Force to obtain new tokens if accessToken is nil #1734

Merged
merged 3 commits into from
Sep 24, 2019

Conversation

JesusMartinAlonso
Copy link
Contributor

Modifications in GetSessionInternal method to force to obtain new tokens if accessToken is nil

Issue #, if available: #1733

Description of changes:

Retrieve access token value in order to check if it is null. In that case, we have to retrieve new tokens. This situation can happen after calling clearSession method.

See #1733 for more information.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@palpatim palpatim added cognito Issues related to AWS Cognito Pull Request labels Aug 12, 2019
@palpatim
Copy link
Member

This will need a test before merging

@palpatim palpatim changed the base branch from master to develop August 12, 2019 15:43
@palpatim
Copy link
Member

We'll need to understand the intent behind the original behavior. I don't immediately see why we'd call clearSession during a user attribute refresh, but it does make sense that a clearSession invocation would require us to revalidate tokens.

@JesusMartinAlonso
Copy link
Contributor Author

@palpatim Is there an estimated time? Note that is a serious bug: Our app won't work properly after this will solved.

Don't hesitate to ask me if you have any doubts.

Thank you!

@JesusMartinAlonso
Copy link
Contributor Author

Any updates about this PR?

@javiboo
Copy link

javiboo commented Sep 9, 2019

@palpatim When do you plan to release the fix of this issue?

Copy link
Member

@palpatim palpatim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor point of code duplication, otherwise change LGTM. We will need to get a test in place for this, which @royjit is working on now.

AWSCognitoAuth/AWSCognitoAuth.m Outdated Show resolved Hide resolved
royjit added a commit that referenced this pull request Sep 24, 2019
After the user attribute update, Cognito clears the session. But this is not later refreshed. This change add test to catch this behavior. This test will fail until the PR #1734  is pushed.
@royjit royjit merged commit ec730a7 into aws-amplify:develop Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cognito Issues related to AWS Cognito
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants