mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #629] OAuth provider returns 403 instead of 401 for expired token #410
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#410
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?
Originally created by @fmoraes74 on GitHub (Oct 21, 2020).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/629
Description:
The HSReplay OAuth provider is returning 403 instead of 401 for an expired token. This means that automatic token renewal is not working as the code only checks for 401 and 400 errors in the NSError extension. Is there a way to work around it without having to explicitly try to refresh the token in case of an unexpected error?
OAuth Provider? (Twitter, Github, ..):
HSReplay.net
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
11.4 (Swift 5.2)
11.x (Swift 5.1)
10.x (Swift 5.0)
other: 12.1
objective c
@phimage commented on GitHub (Nov 10, 2020):
add a new case in code (PR)
https://github.com/OAuthSwift/OAuthSwift/blob/master/Sources/NSError%2BOAuthSwift.swift#L70