Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Refresh oauth20 helper - #138

Merged
mironal merged 7 commits into
mainfrom
refresh-oauth20-helper
Aug 3, 2022
Merged

Refresh oauth20 helper#138
mironal merged 7 commits into
mainfrom
refresh-oauth20-helper

Conversation

@mironal

@mironal mironal commented Aug 2, 2022

Copy link
Copy Markdown
Owner

#134

Example

client.refreshOAuth20Token(type: .publicClient) { result in
    switch result {
        case .succes(let refresh):
            if refresh.refreshed {
                // If necessary, we will handle the saving process, etc.
                // storeToken(oauth20: refresh.token)
            }
    }
}
let refresh = try await client.refreshOAuth20Token(type: .publicClient, forceRefresh: false)
if refresh.refreshed {
    // If necessary, we will handle the saving process, etc.
    // storeToken(oauth20: refresh.token)
}
@codecov-commenter

codecov-commenter commented Aug 2, 2022

Copy link
Copy Markdown

Codecov Report

Merging #138 (b2b236e) into main (70a3c7d) will decrease coverage by 0.04%.
The diff coverage is 63.09%.

@@            Coverage Diff             @@
##             main     #138      +/-   ##
==========================================
- Coverage   80.29%   80.24%   -0.05%     
==========================================
  Files         256      256              
  Lines        6895     6979      +84     
==========================================
+ Hits         5536     5600      +64     
- Misses       1359     1379      +20     
Impacted Files Coverage Δ
Sources/TwitterAPIKit/TwitterAPIKitError.swift 28.64% <0.00%> (-4.69%) ⬇️
Sources/TwitterAPIKit/TwitterAPISession.swift 68.88% <66.66%> (-0.16%) ⬇️
Sources/TwitterAPIKit/TwitterAPIClient.swift 83.49% <95.45%> (+14.00%) ⬆️
Sources/TwitterAPIKit/Extensions/Concurrency.swift 100.00% <100.00%> (ø)
Sources/TwitterAPIKit/AuthAPI/OAuth20API.swift 25.00% <0.00%> (+18.18%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mironal
mironal merged commit 4c6810d into main Aug 3, 2022
@mironal
mironal deleted the refresh-oauth20-helper branch August 3, 2022 08:30
@mironal

mironal commented Aug 3, 2022

Copy link
Copy Markdown
Owner Author
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants