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

Add canRenew() to the Credentials Manager #723

Merged
merged 3 commits into from
Jul 22, 2022
Merged

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Jul 22, 2022

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

📋 Changes

This PR adds the method canRenew() to the Credentials Manager, as hasValid() does not check for the presence of the refresh token (because the presence of the refresh token does not mean that there are valid credentials stored).

This is only a problem when using biometric auth, because otherwise the developer can simply call credentials() and check for the noCredentials error. If biometric auth is enabled, this check will trigger a biometric prompt.

🎯 Testing

Besides unit tests, the changes were tested manually with an iPhone simulator running iOS 15.5 using Xcode 13.4.1 (13F100).

@Widcket Widcket requested a review from a team as a code owner July 22, 2022 01:30
stevehobbsdev
stevehobbsdev previously approved these changes Jul 22, 2022
@Widcket Widcket enabled auto-merge (squash) July 22, 2022 12:07
@Widcket Widcket merged commit fb1db3f into master Jul 22, 2022
@Widcket Widcket deleted the feature/can-renew branch July 22, 2022 12:28
@Widcket Widcket mentioned this pull request Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants