user3215925
user3215925

Reputation: 71

Github pages + OAuth

I'm making a game on a Github Pages in HTML5 and I would like to add a Twitter, Facebook and Google connect to let my users share their results with their friends.

Is there a way to make the complete OAuth flow (request token, signatures, fetch the access token, etc.) on a github page? Do you know a service or a framework which works in a github pages (without backend)?

Upvotes: 7

Views: 1910

Answers (1)

krispo
krispo

Reputation: 526

I don't know as far this would help you, but I've recently written a plugin that solves the same problem for Github connection.

The problem with providing the complete OAuth flow is related to some CORS limitations of Github API. Suppose, we will encounter with the same problems also for socials api. The only way out of this is to use a tiny proxy server, that can help to complete OAuth process.

This is a tiny sinatra proxy server that I use for Github connection (according to docs). Think it can be quickly extended to socials. Actually, server should be installed only once (for example, to heroku cloud), and then can be used for all your applications.

Upvotes: 1

Related Questions