Hacker News new | ask | show | jobs
by eric_bullington 4317 days ago
This is a very, very nice project -- almost enough to pull me back from ReactJS back to AngularJS. Almost.

One question: they say it can be adapted to any Oauth1 or 2 provider, but doesn't the Oauth 2 provider have to support the Implicit Flow for this type of client-side app to work?

If so, is it true that Github doesn't support Implicit flow? (this is what I've read, and I've not found much on the web otherwise about what exact oauth flows Github supports)

1 comments

Satellizer gives you an illusion that you're doing an implicit grant flow by opening a popup and then magically you are signed-in. But authorization process is handled on the server: https://github.com/sahat/satellizer/blob/master/examples/ser...

I just implemented a GitHub sign-in and it took me only 8 minutes because on the server it was mostly copy-&-paste of the Facebook sign-in and on the client it's just:

  $authProvider.oauth2({
    name: 'github',
    clientId: 'xxxxxx',
    url: '/auth/github',
    authorizationEndpoint: 'https://github.com/login/oauth/authorize',
    redirectUri: window.location.origin
  });
Thank you. I like React too so perhaps someone could implement something like Satellizer that integrates with React.
Thanks for the explanation.

>I like React too so perhaps someone could implement something like Satellizer that integrates with React.

Indeed. And such a project could still make use of the server code of Satellizer, I'd imagine.