Skip to content

Conversation

@maverikou
Copy link

What kind of change does this PR introduce?

Refresh token never expires. Don't need to check for session expiration when refreshing.
This fixes a bug making it impossible to recover a session after the client has been offline for longer than the expiry time of the access token.

What is the current behavior?

Can't use a refresh token beyond the expiry time of the access token.

What is the new behavior?

Client can now try to refresh the access token for as long as it holds the refresh token.

@maverikou
Copy link
Author

Hi. I'm having the same issue here. Is there really any workaround ?

Are you saying this patch doesn't resolve the issue?

@zalito12
Copy link

I think this could solve #108

@zalito12
Copy link

I tested this changes and, actually, it helps but it doesn't fully fix #108

I needed to make a change in RetrieveSessionAsync. Here it always destroys the session and never try to refresh:

if (CurrentSession != null && CurrentSession.Expired())
{
    _debugNotification?.Log($"Loaded session has expired");
    DestroySession();
    return null;
}

I changed it so it checks if autorefresh is activated, and now it works fine, autorefresh the token everytime I open the app and the session has expired:

if (CurrentSession != null && CurrentSession.Expired() && !Options.AutoRefreshToken)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants