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)
>>> "%x" % random.randint(0,(1 << 20*4) -1)


More on OAuth