mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #253] Wrong 'parameter' for startAuthorizedRequest() after requesting a new access token #146
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#146
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 @mixable on GitHub (Jul 18, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/253
Using
startAuthorizedRequest()when the stored access token expired will force a renew of the access token by automatically callingrenewAccesstokenWithRefreshToken(). After successfully retrieving a new token,startAuthorizedRequest()will be called a second time to get the requested data (see OAuth2Swift.swift line 243).Bug: the second method call is done with different parameters.
parametersin line 249 are not the original once given tostartAuthorizedRequest(). When passing custom parameters, they are not available in the second method call.Or am I using this method in a wrong way? As the method
client.post()does not have the feature of automatically renewing the access token, I passed my POST data tostartAuthorizedRequest()and ended up with the described behaviour.@mixable commented on GitHub (Jul 24, 2016):
Solution:
In line 234 rename
parametersto e.g.refreshParameters:@phimage commented on GitHub (Jul 24, 2016):
could you make a PR?