Django authentification with GitHub via social_auth -


i try build minimalistic example of github autentification social_auth. in documents have problem. can explain how determine problem?

this setting accorded social_auth:

authentification_backends =(         'social_auth.backends.contrib.github.githubbackend',         'django.contrib.auth.backends.modelbackend',     )  github_api_id = 'key' # hide key github_api_secret = 'secret' # hide secret  login_url = reverse_lazy('account:login') login_redirect_url = reverse_lazy('account:hello') login_error_url = reverse_lazy('account:login_error')  social_auth_default_username = 'new_social_auth_user'  auth_user_model = 'auth.user' social_auth_user_model = 'auth.user'  social_auth_raise_exceptions = true   template_context_processors = (      'social_auth.context_processors.social_auth_by_name_backends',     'social_auth.context_processors.social_auth_backends',     #'social_auth.context_processors.social_auth_by_type_backends',     'social_auth.context_processors.social_auth_login_redirect', ) installed_apps = (     # native     'django.contrib.auth',     ...     'social_auth',     # own     'account', ) middleware_classes = (     'django.middleware.common.commonmiddleware',     'django.contrib.sessions.middleware.sessionmiddleware',     'social_auth.middleware.socialauthexceptionmiddleware',     'django.middleware.csrf.csrfviewmiddleware',     'django.contrib.auth.middleware.authenticationmiddleware',     'django.contrib.messages.middleware.messagemiddleware',     # uncomment next line simple clickjacking protection:     # 'django.middleware.clickjacking.xframeoptionsmiddleware', ) 

urls.py

urlpatterns = patterns('',                                                                        url(r'^$', homeview.as_view(), name='home'),                                                  url(r'^', include('account.urls', namespace='account')),                                      url(r'', include('social_auth.urls')),                                                    )       

in settings of github application wrote: full url application's homepage:

http://127.0.0.1:8000 

your application's callback url; read our oauth documentation more information: http://127.0.0.1:8000/account/hello

and when try login via github have redirection error page in server console see:

[08/aug/2013 06:47:24] "get /sign-up/ http/1.1" 200 898 [08/aug/2013 06:47:26] "get /login/github/ http/1.1" 302 0 [08/aug/2013 06:47:26] "get /error/ http/1.1" 200 17 

is know how can determine root of problem? or how can debug problem? tried rewrite code have same problem

like github application says:

the full url application's homepage

http://127.0.0.1:8000 pointing localhost. need put ip or domain name points your server.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -