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

Tumblr does not accept oauth_signature when trying to get access token #64

Closed
JaffParker opened this issue Mar 22, 2016 · 5 comments
Closed

Comments

@JaffParker
Copy link

Signature of the request passes fine when I'm getting the OAuth token, but it fails when I try to get the access token. The error that I get from Tumblr is this:

oauth_signature does not match expected value

I tried to Google the error, but the only reasons I found were typos. I verified that I didn't make a mistake, but the error is still there. I appreciate your help!

@bencorlett
Copy link
Member

Heya, are you able to clarify what you're doing with a code sample?

@JaffParker
Copy link
Author

Sure. To clarify: I'm using Laravel Socialite, which uses League's OAuth1 Client, so here's the code:

    public function user()
    {
        if (! $this->hasNecessaryVerifier()) {
            throw new InvalidArgumentException('Invalid request. Missing OAuth verifier.');
        }

        $user = $this->server->getUserDetails($token = $this->getToken());
        dd($user);
    }

Then getToken() looks like this:

    protected function getToken()
    {
        $temp = $this->request->getSession()->get('oauth.temp');

        return $this->server->getTokenCredentials(
            $temp, $this->request->get('oauth_token'), $this->request->get('oauth_verifier')
        );
    }

And $this->server is an instance of League\OAuth1\Client\Server\Tumblr class.

@bencorlett
Copy link
Member

Are the values of:

$temp,
$this->request->get('oauth_token'),
$this->request->get('oauth_verifier')

All correct?

Obviously it's not easy to know if they're "correct", but do they look suspicious or are any empty?

@JaffParker
Copy link
Author

You sir, are a genius. oauth.temp did not have the secret, it was removed at some step. Pretty stupid error, but thank you for guiding me :)

@bencorlett
Copy link
Member

You’re most welcome :)

On 23 Mar 2016, at 9:54 AM, Jaff Parker notifications@github.com wrote:

Closed #64 #64.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #64 (comment)

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

2 participants