Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub documentation #469

Merged
merged 2 commits into from
Jan 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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