Angular proxy not working with Django allauth

I have an angular + django project and mostly everything is working. I've setup a proxy.conf as mentioned in the documenation - example here:

{
    "/api": {
        "target": "http://localhost:8000",
        "secure": false,
        "logLevel": "debug",
        "changeOrigin": true
    }
}

but for some reason I cannot make api calls to any django allauth endpoints. The proxy is working because i can make a request to /api/accounts/profile which is a custom view i created to fetch a users information. However, what I'm trying to do is use allauths pre-created endpoints such as /accounts/login or /accounts/logout. If I make a request to http://localhost:4200/accounts/login I get 404 errors that the page/view isn't found. If I remove the domain name so that the proxy kicks in - example: /accounts/login its the same thing. If I change the url to be http://localhost:8000/accounts/login I suddenly get cross origins errors, which means the url is recognized as existing but is not accessable. I have already added all of the cross origins settings to my settings.py and added crf token validation to eliminate some possibilities. Has anyone else experienced this and if so what have you done to fix it? I don't want to create views in Django, that would be the "easy" fix but I want to keep the Angular frontend and just use Django as a backend. Thanks in advance!

Back to Top