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

feat(auth): prevent sign-outs during poor network conditions #28

Merged
merged 4 commits into from
Nov 11, 2022

Conversation

mhamann
Copy link
Contributor

@mhamann mhamann commented Nov 11, 2022

Previously, users could be inadvertently signed-out during times of poor network conditions, disruptions, service downtime, etc even when their refresh token was still perfectly valid.

Now, we take a more nuanced approach such that transient network disruptions or unexpected HTTP status codes won't immediately result in a user being signed-out. Only an HTTP status code of 400 will do that. If the condition persists after several retries, we'll throw an error to the caller so they can take any action they deem appropriate (e.g., show an error to the user, show stale data, cache the action for later, etc).

Copy link
Contributor

@BobbyRadford BobbyRadford left a comment

Choose a reason for hiding this comment

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

Looks good. Lot's of helpful tests, too.

Sources/Rownd/framework/Container.swift Outdated Show resolved Hide resolved
Sources/Rownd/framework/RowndApi.swift Show resolved Hide resolved
@mhamann mhamann merged commit a605b84 into main Nov 11, 2022
@mhamann mhamann deleted the handle-auth-errors branch November 11, 2022 22:44
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