mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #94] credential.auth2 variable is not automatically set to 'true' when using OAuth2Swift #58
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#58
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 @ghost on GitHub (Aug 18, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/94
the
oauth2variable inOAuthSwiftCredentialdoes not get set totruewhen authorizing with OAuth2. This means that the client does not use oauth2 headers (request.headers = ["Authorization": "Bearer \(self.credential.oauth_token)"]) when making network requests.While this can be worked around by explicitly setting the
oauth2variable totrue, shouldn't this happen by default??@phimage commented on GitHub (Aug 18, 2015):
The variable is set to
truewhen token is filledAre you talking about a scenario where you fill manually an old token?
In this case, you must set to
truetheoauth2variable ;(If not how you achieve this?
@ghost commented on GitHub (Aug 18, 2015):
self.client.credential.oauth2only gets set totruevia a call topostOAuthAccessTokenWithRequestTokenByCodeifresponseParameters["code"]exists. If you are authorising via OAuth2 andresponseParameters["access_token"]exists butresponseParameters["code"]doesn't, thenself.client.credential.oauth2does not get set and defaults tofalse@phimage commented on GitHub (Aug 25, 2015):
good point
so setting the oauth2 variable to true for that case solve this issue :
You can make a PR or I will do it later