0

I have tried to set up social authentication for steam login button. I have followed all these steps, and added steam necessary stuff: adding API key to settings and steam.SteamOpenId to authentication backends.

The error:

Using the URLconf defined in Test.urls, Django tried these URL patterns, in this order:
^ ^$ [name='index']
^login/(?P<backend>[^/]+)/$ [name='begin']
^complete/(?P<backend>[^/]+)/$ [name='complete']
^disconnect/(?P<backend>[^/]+)/$ [name='disconnect']
^disconnect/(?P<backend>[^/]+)/(?P<association_id>[^/]+)/$ [name='disconnect_individual']
^admin/

Hyperlink i used to make login button:

<a href="/login/steam?next=/">Login</a>

urls.py file of project:

from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^', include('Home.urls')),
    url('', include('social.apps.django_app.urls', namespace='social')),
    url(r'^admin/', admin.site.urls),
]

urls.py file of application Home:

from django.conf.urls import url

from . import views

app_name = 'Home'
urlpatterns = [
    url(r'^$', views.index, name='index'),
]

Full Project Here.

I am wondering if there is still something that i need to set up, do i need to add views to url patterns? If so, then which? where is social authentication urls file located?

ShellRox
  • 2,532
  • 6
  • 42
  • 90
  • 1
    Do you have `APPEND_SLASH` in your settings set to `False`? If so, Django will not redirect `/login/steam` to `/login/steam/`. If that's not the issue, can you post the complete traceback and the relevant `urls.py` files? – knbk Jun 26 '16 at 10:42
  • @knbk I couldn't find anything relevant to `APPEND_SLASH` in `settings.py` file, Is there something wrong? – ShellRox Jun 26 '16 at 10:45
  • 1
    Then that is not the issue, the default is `True`. It would explain your problem, but apparently there's a different cause for the behaviour you're seeing. – knbk Jun 26 '16 at 10:47
  • added the data of projects urls.py file and application's manually created urls.py file @knbk – ShellRox Jun 26 '16 at 10:52
  • 1
    Just to confirm: if you add a trailing slash to the url, so it becomes `/login/steam/?next=/`, does it still not work? – knbk Jun 26 '16 at 11:00
  • It doesn't work, I have tried accessing /login/ pattern itself, but still gave me 404 response. @knbk – ShellRox Jun 26 '16 at 11:03

0 Answers0