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

Call to /request_token after canceling a request fails with HTTP 401 because oauth_token is already set. #704

Open
5 of 19 tasks
mcontin opened this issue Nov 17, 2022 · 0 comments

Comments

@mcontin
Copy link

mcontin commented Nov 17, 2022

Description:

Call to /request_token after canceling a request fails with an HTTP error 401 because credential.oauth_token is already set and is passed to the headers parameters.
I am trying to verify that we can correctly cancel a login attempt to Garmin made with our view controller that implements OAuthWebViewController.
We are canceling the login attempt like this:

var service: OAuthSwift?
private func cancelFlow() {
    service?.cancel()
    dismissWebViewController()
}

But if we try to call service.authorize again, the call fails without opening our custom OAuthWebViewController with a 401 unauthorized error, and the difference is that in the second call the oauth_token parameter is set.

Are we canceling the request the wrong way? Is Garmin supposed to check oauth_token? Is oauth_token supposed to be still set after canceling a request?

OAuth Provider? (Twitter, Github, ..):

Garmin

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually

Library version:

  • head
  • v2.2.0
  • v2.0.0
  • v1.4.1
  • other: (Please fill in the version you are using.)

Xcode version:

  • 11.4 (Swift 5.2)
  • 11.x (Swift 5.1)
  • 10.x (Swift 5.0)
  • other: 14.1 but irrelevant
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

No branches or pull requests

1 participant