Giter VIP home page Giter VIP logo

Comments (3)

pennersr avatar pennersr commented on May 20, 2024

There is no reason why allauth would go looking for a provider called accounts without that being configured somehow, unless the project's URL routing somehow mistakenly interprets the accounts in your /en/accounts/login as a provider ID. I would recommend you first use standard URL routing (e.g. don't auto prefix /en/) and then figure out why things start breaking when you gradually expand from there...

from django-allauth.

pennersr avatar pennersr commented on May 20, 2024

Closing -- feel free to reopen if you have a reproducible scenario with an uncustomized allauth.

from django-allauth.

enzedonline avatar enzedonline commented on May 20, 2024

It's redirected to /en as it's a multilingual site. No site exists at /.
'accounts' isn't configured anywhere other than being a prefix for the allauth urls.
It's only on the login view, and only when OIDC is added to INSTALLED_APPS that this issue arises with or without an OIDC provider defined.

Your suggestion regarding the urls did lead me to find a duplicate path for allauth.urls though:

urlpatterns = urlpatterns + i18n_patterns(
    ...
    re_path(r'^accounts/', include('allauth.urls')),
    ...
    re_path(r'', include('allauth.urls')),
    ...
)

When I take out the second, the error goes away. It was there for some historic reason I can only guess.

I couldn't track what calls with provider='accounts' in the end. From searching and stepping through the code, it comes from the get_providers & provider_login_url templatetags, but these don't even get called when the error gets thrown. I can even see the error in the console when starting the server.

Anyway, thanks for the help, much appreciated!

from django-allauth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.