Skip to content

Commit

Permalink
Merge pull request #469 from alexmuller/github-docs
Browse files Browse the repository at this point in the history
Update GitHub documentation
  • Loading branch information
omab committed Jan 2, 2015
2 parents a84f6a1 + 0a31ebb commit f23b409
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions docs/backends/github.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
GitHub
======

Github works similar to Facebook (OAuth).
GitHub works similar to Facebook (OAuth).

- Register a new application at `GitHub Developers`_, set the callback URL to
``http://example.com/complete/github/`` replacing ``example.com`` with your
domain.

- Fill ``App Id`` and ``App Secret`` values in the settings::
- Fill the ``Client ID`` and ``Client Secret`` values from GitHub in the settings::

SOCIAL_AUTH_GITHUB_KEY = ''
SOCIAL_AUTH_GITHUB_SECRET = ''
Expand All @@ -17,37 +17,37 @@ Github works similar to Facebook (OAuth).
SOCIAL_AUTH_GITHUB_SCOPE = [...]


Github for Organizations
GitHub for Organizations
------------------------

When defining authentication for organizations, use the
``GithubOrganizationOAuth2`` backend instead. The settings are the same than
``GithubOrganizationOAuth2`` backend instead. The settings are the same as
the non-organization backend, but the names must be::

SOCIAL_AUTH_GITHUB_ORG_*
SOCIAL_AUTH_GITHUB_ORG_*

Be sure to define the organization name using the setting::

SOCIAL_AUTH_GITHUB_ORG_NAME = ''

This name will be used to check that the user really belongs to the given
organization and discard it in case he's not part of it.
organization and discard it if they're not part of it.


Github for Teams
GitHub for Teams
----------------

Similar to ``Github for Organizations``, there's a Github for Teams backend,
use the backend ``GithubTeamOAuth2``. The settings are the same than
Similar to ``GitHub for Organizations``, there's a GitHub for Teams backend,
use the backend ``GithubTeamOAuth2``. The settings are the same as
the basic backend, but the names must be::

SOCIAL_AUTH_GITHUB_TEAM_*

Be sure to define the ``Team Id`` using the setting::
Be sure to define the ``Team ID`` using the setting::

SOCIAL_AUTH_GITHUB_TEAM_ID = ''

This ``id`` will be used to check that the user really belongs to the given
team and discard it in case he's not part of it.
team and discard it if they're not part of it.

.. _GitHub Developers: https://github.com/settings/applications/new
3 changes: 2 additions & 1 deletion docs/configuration/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Miscellaneous settings
``SOCIAL_AUTH_SESSION_EXPIRATION = False``
By default, user session expiration time will be set by your web
framework (in Django, for example, it is set with
SOCIAL_AUTH_SESSION_EXPIRATION). Some providers return the time that the
`SESSION_COOKIE_AGE`_). Some providers return the time that the
access token will live, which is stored in ``UserSocialAuth.extra_data``
under the key ``expires``. Changing this setting to True will override your
web framework's session length setting and set user session lengths to
Expand Down Expand Up @@ -303,3 +303,4 @@ using POST.
.. _OAuth: http://oauth.net/
.. _passwordless authentication mechanism: https://medium.com/@ninjudd/passwords-are-obsolete-9ed56d483eb
.. _psa-passwordless: https://github.com/omab/psa-passwordless
.. _SESSION_COOKIE_AGE: https://docs.djangoproject.com/en/1.7/ref/settings/#std:setting-SESSION_COOKIE_AGE

0 comments on commit f23b409

Please sign in to comment.