Skip to content

How do I retrieve the data for this plugin? #8

Description

I installed the Google Opauth Strategy and it's working brilliantly. The LinkedIn one acts a little differently; in the directions for this strategy it specifies that no OAuth Redirect URL is needed (on the LinkedIn Developer website). I tried leaving this out, and kept getting this error:

'Invalid redirect_uri. This value must match a URL registered with the API Key.'

This error is also on the demo for the plugin here: http://opauth.org/#demo

So I changed it up a bit and placed my redirect URL there just in case, like my Google one has, and it seemed to have worked! It took me to the LinkedIn login screen, I put in my credentials, and it redirected me back to my application. The trouble is, no data was returned this time.

My defaults in LinkedInStrategy.php looks like this:

public $defaults = array(
'redirect_uri' => 'http://localhost/users/login',
'response_type' => 'code',
'scope' => 'r_fullprofile r_emailaddress r_contactinfo'
);

In my controller I have this:

$_SESSION['log'] = $this->data;

In my view I have this:

debug($_SESSION['log']);

This is just to see if the data is setting. When I log in with GoogleStrategy.php settings, it returns all of the data and I use it to log me in. Perfect. But with this one, I just get empty arrays. Has something changed?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions