OAuth

The way we implement 'login with Facebook', 'login with Google', etc.

More on OAuth

TODO: Add documentation on OAuth here

Documenting OAuth

When writing documentation for OAuth, you may need to generate random “fake” numbers for the Client Id and Client Secret. That is, you may want to show a screenshot of the screen in the Github OAuth Applications screen that shows the Client Id and Client Secret, but you’ll want to replace the actual numbers in the screenshot with fake ones.

Here’s some quick and dirty Python to generate plausible numbers.

>>> import random
>>> "%x" % random.randint(0,(1 << 40*4) -1)
'7f3572b1b91d4ec5297fab54b1ab51b5dc8a997d'
>>> "%x" % random.randint(0,(1 << 20*4) -1)
'99fe329dc31f75e9b92b'
>>> 

Explanation:

More on OAuth