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

Using the library with three buttons #103

Closed
reypm opened this issue May 30, 2014 · 4 comments
Closed

Using the library with three buttons #103

reypm opened this issue May 30, 2014 · 4 comments

Comments

@reypm
Copy link

reypm commented May 30, 2014

So I have this three buttons in my page, one for Facebook, Google+ and forget Twitter since it's not supported by this library:

5-29-2014 10-43-14 pm

And I'm trying to integrate your library in a module for PyroCMS where users should be able to login using their OAuth credentials trough Google+ and Facebook, how I should call the providers? I mean where is supposed to do if I click in Facebook button? Which method should I call in order to redirect users to Facebook App and setup permissions and the same for Google+?

@ramsey
Copy link
Contributor

ramsey commented Nov 28, 2014

I would instantiate three different Provider objects (i.e. $providerFacebook, $providerTwitter, $providerGoogle), and then use them as shown in the usage example on the README. Specifically, you'll call getAuthorizationUrl() on each provider, and that's the URL you direct people to, when they click these buttons.

Does that help?

@ramsey
Copy link
Contributor

ramsey commented Nov 28, 2014

Also, your redirectUri for each provider will need to be unique (i.e. "https://example.org/login?provider=google"), so that when they are redirected back to you, after granting permission, you can tell which provider to use for getting the access token.

@ramsey
Copy link
Contributor

ramsey commented Dec 16, 2014

@paquitodev, were my comments helpful?

@reypm
Copy link
Author

reypm commented Dec 16, 2014

@ramsey Yes, thanks

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