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

oauth1 (Twitter) compatibility #6

Closed
aliasdoc opened this issue Jan 9, 2017 · 6 comments
Closed

oauth1 (Twitter) compatibility #6

aliasdoc opened this issue Jan 9, 2017 · 6 comments

Comments

@aliasdoc
Copy link

aliasdoc commented Jan 9, 2017

Hi, good work @adaojunior but I think it's good to add oauth1 compatibility with using access_token_secret, I made this by modifying these two files:

SocialGrant.php

protected function validateUser(ServerRequestInterface $request)
    {
        $user = $this->resolver->resolve(
            $this->getParameter('network', $request),
            $this->getParameter('access_token', $request),
            $this->getParameter('access_token_secret', $request) <-- add this line
        );


SocialUserResolverInterface.php

public function resolve($network, $accessToken, $accessTokenSecret); <-- add accessTokenSecret param
@adaojunior
Copy link
Owner

@aliasdoc thank you, I'll look into it later.

@adaojunior
Copy link
Owner

@aliasdoc I'm not gonna add this to the library, but since you're the one that resolves the user you just need to send the extra field in the request and get it back with request()->get('access_token_secret') on resolve(...).
What do you think ?

@aliasdoc
Copy link
Author

@adaojunior yes, it's a possibility but it breaks concept I think.

@adaojunior
Copy link
Owner

Yes 😞 but also Oauth 1 has been deprecated for a while right ?

@aliasdoc
Copy link
Author

Not definitely, Twitter for example still uses oauth1 ;)

@adaojunior
Copy link
Owner

This is being addressed in the last update, see #10 and https://github.com/adaojunior/passport-social-grant/releases/tag/v2.0-beta.1

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