mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 04:35:56 +03:00
[PR #693] Improvements to requestWithAutomaticAccessTokenRenewal #721
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#721
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/OAuthSwift/OAuthSwift/pull/693
Author: @vgritsenko
Created: 1/31/2022
Status: 🔄 Open
Base:
master← Head:master📝 Commits (1)
e3da86eFix error handling and improve control flow in requestWithAutomaticAccessTokenRenewal.📊 Changes
1 file changed (+16 additions, -27 deletions)
View changed files
📝
Sources/OAuthSwiftClient.swift(+16 -27)📄 Description
This fixes error handling, and makes a couple of improvements to implementation of the
requestWithAutomaticAccessTokenRenewalfunction:tokenExpired;onTokenRenewalparameter as truly optional - perform the token renewal even ifonTokenRenewalisnil;selfin the completion block forrenewAccessTokencall.The main issue I had was that
requestWithAutomaticAccessTokenRenewalwould swallow all errors and convert them to the emptytokenExpirederrors, preventing any possibility of implementing custom error handling logic on the client side:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.