Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

github logins

  • Loading branch information...
commit bd4e9da66df7527020cc53c5619ae45b3654a789 1 parent 97803c9
@holdenk authored
View
2  frontend/unicorn/templates/index.html
@@ -3,6 +3,6 @@
<title>Holden's Magical Unicorn Review Board</title>
</head>
<body>
-Welcome to Holden's Magical Unicorn's Review Board, here you can review pull requests generated by <a href="https://github.com/holdenk/holdensmagicalunicorn">the magical unicorn</a>. Get started <a href="/review">here!</a>
+Welcome to Holden's Magical Unicorn's Review Board, here you can review pull requests generated by <a href="https://github.com/holdenk/holdensmagicalunicorn">the magical unicorn</a>. Get started <a href="{% url socialauth_begin 'github' %}">here!</a>
</body>
</html>
View
1  frontend/unicorn/templates/review.html
@@ -0,0 +1 @@
+Reviews and stuff.
View
26 frontend/unicorn/unicorn/settings.py
@@ -165,3 +165,29 @@
'social_auth.backends.contrib.github.GithubBackend',
'django.contrib.auth.backends.ModelBackend',
)
+
+TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.contrib.auth.context_processors.auth',
+ 'django.core.context_processors.debug',
+ 'django.core.context_processors.i18n',
+ 'django.core.context_processors.media',
+ 'django.contrib.messages.context_processors.messages',
+ 'social_auth.context_processors.social_auth_by_type_backends',
+)
+
+SOCIAL_AUTH_PIPELINE = (
+ 'social_auth.backends.pipeline.social.social_auth_user',
+ 'social_auth.backends.pipeline.associate.associate_by_email',
+ 'social_auth.backends.pipeline.user.get_username',
+ 'social_auth.backends.pipeline.user.create_user',
+ 'social_auth.backends.pipeline.social.associate_user',
+ 'social_auth.backends.pipeline.social.load_extra_data',
+ 'social_auth.backends.pipeline.user.update_user_details'
+)
+LOGIN_REDIRECT_URL="/review"
+LOGIN_URL="/accounts/login/github"
+
+try:
+ from local_settings import *
+except:
+ pass
View
2  frontend/unicorn/unicorn/urls.py
@@ -15,5 +15,5 @@
url(r'^admin/', include(admin.site.urls)),
url(r'^$', 'verify.views.index'),
url(r'^review', 'verify.views.review'),
-
+ url(r'accounts/', include('social_auth.urls')),
)
Please sign in to comment.
Something went wrong with that request. Please try again.