1

I need to get an access token from differente providers from the client side.

The idea is that I need the user to authenticate with these providers from javascript, and then retrieve an access token to be used to authenticate against another web service...

So far now, we managed to do it on twitter using twitter-anywhere, in facebook using the javascript SDK and in google using it's api-javascript-client

I was wondering if there's a similar solution for yahoo, linked and github. Or even better, a more general solution that could handle different providers...

4
  • 2
    Recently I e-mailed GitHub support about this. Here's what they said: "We have specifically disallowed client side oauth logins because there is no way to securely do this. The client application will always end up potentially leaking sensitive information which just means we are putting our users at risk." Commented Oct 31, 2012 at 18:41
  • While looking for the same answer, I was able to find: blog.vjeux.com/2012/javascript/… Commented Nov 3, 2012 at 20:32
  • @IvanZuzak does this mean that even though CORS is enabled for Github, we cannot generate access tokens on client side using jQuery etc? Commented Sep 15, 2014 at 7:45
  • 1
    @varagrawal Correct, you need to have a server-side component to complete the OAuth flow. Commented Sep 15, 2014 at 9:35

1 Answer 1

2

Surely, there is one for Linkedin.

http://developer.linkedin.com/javascript

http://developer.linkedin.com/documents/javascript-api-reference-0

Not sure if this was around when the question was asked. For github, the comment by @Ivan Zuzak would suffice.

This link has a workaround with a little server support - http://blog.vjeux.com/2012/javascript/github-oauth-login-browser-side.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.