Is there a way to redirect to an External Origin URL | Headless Social Login #3882
Unanswered
alvarohc777
asked this question in
Q&A
Replies: 1 comment 2 replies
-
The callback URL must be a backend URL, it cannot be a frontend URL, as several providers use POST requests to the callback, and the frontend is not capable of handling that. But this does not appear to be your issue. In your case, a redirect is happening from the provider to the callback URL. There, an error is detected, and the callback view wants to redirect to a frontend URL that can display this error. But, your |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a question, I am making a post request with a form using django headless to http://localhost:8000/_allauth/browser/v1/auth/provider/redirect using google as provider. I was wondering if there is a way to override the callback url to an external url, for example, localhost:9000, where I host my Frontend SPA.
As seen in this image, when trying to use localhost:9000 on the callback_url parameter in the body of the post request, I get an error:
The issue is the external origin url, as it works fine with localhost:8000. However I would like it to redirect to a url on my frontend SPA on port 9000.
I read the source code for headless, and there are no methods on the adapter.py inside the headless module. I am not sure if there is a way to override this behaviour with a parameter of any other thing I've missed. If it's possible to do or not, I would greatly appreciate any help.
Thank you :)
Beta Was this translation helpful? Give feedback.
All reactions