Using LoginRequiredMiddleware, I am able to set “login required” as default (instead of having to put the @login_required decorator on every view, and possibly forgetting it), and exempt certain views from this restriction by using the @login_not_required decorator.
However, I am using social-auth as an authentication backend, and it is trying to access some urls during the authentication process: It sends the requests “GET /social-auth/login/some_custom_backend/” and “GET /social-auth/complete/some_custom_backend/lots_of_info”.
These requests are blocked in process_view() and I am returned to the login view.
If I add a manual exemption for these two urls in process_view(), the authentication completes and I am logged in.
Is there a setting somewhere that I can use to set exemptions for certain urls? Or should there be (i.e. are there safety issues that indicates that I shouldn’t be doing this)?