Skip to content

oauth_callback can't be URL encoded when passing with GET #197

Description

@arbel03

Hi!
I am implementing my own OAuth1 handler and when trying to pass the oauth_callback I received a "URL Callback invalid" error multiple times,
when I changed my code of getting the query string that should look like this:

oauth_callback=...&oauth_consumer_key=...&oauth_nonce=...&oauth_signature=...&oauth_signature_method=HMAC-SHA1&oauth_timestamp=...&oauth_version=1.0

With the parameters URL encoded to this:

    return getOAuthString(seperator: "&", format: { (key, value) -> String in
            //oauth_callback shouldn't be url encoded.

            final_value = key == "oauth_callback" ? value : value.urlEncoded()
            return "\(key)=\(final_value)"
    })

It suddenly worked.
a URL decode would help there a lot 👍 . Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions