Skip to content

Commit

Permalink
Merge pull request #13 from egc-sierrezuela-2/auth-02
Browse files Browse the repository at this point in the history
Auth 02
  • Loading branch information
adrleogom authored Dec 18, 2021
2 parents fec15d6 + 638ca38 commit 8bbd8cc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions decide/authentication/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ <h2>Iniciar sesion</h2>
<button>
<a href="{% url 'social:begin' 'linkedin-oauth2' %}">Login with LinkedIn</a>
</button>
<button>
<a href="{% url 'social:begin' 'github' %}">Login with Github</a>
</button>
{% if message %}
<p>Error: {{message}}</p>
{% endif %}
Expand Down
4 changes: 4 additions & 0 deletions decide/decide/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
SOCIAL_AUTH_FACEBOOK_KEY = '1264747420669126'
SOCIAL_AUTH_FACEBOOK_SECRET = '7c0056d7c8eaf7a5860fd1e043083338'

SOCIAL_AUTH_GITHUB_KEY = '90b033dd9f3f8519fa07'
SOCIAL_AUTH_GITHUB_SECRET = 'fb6c0a504057833bd72e1cb063e5a74cccea6f7a'

SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = '78ppaogakulk4n' # Client ID
SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = 'aAr8rmN2zlEzw6Vz' # Client Secret
SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE = ['r_liteprofile', 'r_emailaddress']
Expand All @@ -156,6 +159,7 @@
'social_core.backends.linkedin.LinkedinOAuth2',
'social_core.backends.instagram.InstagramOAuth2',
'social_core.backends.facebook.FacebookOAuth2',
'social_core.backends.github.GithubOAuth2',
)
# Password validation
# https://docs.djangoproject.com/en/2.0/ref/settings/#auth-password-validators
Expand Down
7 changes: 6 additions & 1 deletion decide/local_settings.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@
SOCIAL_AUTH_FACEBOOK_KEY = '1006606710196386'
SOCIAL_AUTH_FACEBOOK_SECRET = '12d5bc07c1c41cea14846e85bbe4b460'

SOCIAL_AUTH_GITHUB_KEY = '1d28207db9b47ce585ea'
SOCIAL_AUTH_GITHUB_SECRET = '4da7a5f6d9cf1d91572ad09b62a561df393a7d64'


SOCIAL_AUTH_LINKEDIN_OAUTH2_KEY = '78ppaogakulk4n' # Client ID
SOCIAL_AUTH_LINKEDIN_OAUTH2_SECRET = 'aAr8rmN2zlEzw6Vz' # Client Secret
SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE = ['r_basicprofile', 'r_emailaddress']
SOCIAL_AUTH_LINKEDIN_OAUTH2_SCOPE = ['r_liteprofile', 'r_emailaddress']
SOCIAL_AUTH_LINKEDIN_OAUTH2_FIELD_SELECTORS = ['email-address', 'formatted-name', 'public-profile-url', 'picture-url']
SOCIAL_AUTH_LINKEDIN_OAUTH2_EXTRA_DATA = [
('id', 'id'),
Expand All @@ -67,6 +71,7 @@
'social_core.backends.linkedin.LinkedinOAuth2',
'social_core.backends.instagram.InstagramOAuth2',
'social_core.backends.facebook.FacebookOAuth2',
'social_core.backends.github.GithubOAuth2',
)

# number of bits for the key, all auths should use the same number of bits
Expand Down

0 comments on commit 8bbd8cc

Please sign in to comment.