-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello @cdcarter @tomdee @quique @krizh-p @jezdez @pennersr @pacesm @jplehmann @PabloCastellano @tomdee @oalamoudi @quique @fabiocerqueira @facugaich @fdobrovolny @fengsi Hello all, I face one more issue witht the django all auth
i am using social allauth, and return is_safe_url to true to handle all domains used in rediect_url howbeit, i dont know which function can get the type value . the url is this http://localhost:8000/auth/signin/?next=//shop.apps.local:8000/store/checkout&type=customer. So my question is getting the value of parameter, ie &type=something obvious from . Please HELP TO ANSWER THIS AND SAVE ME TIME . I need to know how to track the type=customer with django-allauth during a redirect , your help is deeply appreciated |
Beta Was this translation helpful? Give feedback.
-
Closing this thread as the issue is not with allauth. In case anyone looks at this in the future, the problem was that Next.js does not send cookies with const response = await fetch("http://localhost:8000/_allauth/browser/v1/auth/signup", {
method: "POST",
headers: {
"Content-Type": "application/json",
'X-CSRFToken': csrftoken as string, // Django might not read the X-CSRFToken header
Cookie: cookies().toString(), // Use this instead to send Cookies with Nextjs
},
body: JSON.stringify({ username, email, password }),
credentials: "include" // Next.js will ignore this
}); |
Beta Was this translation helpful? Give feedback.
Closing this thread as the issue is not with allauth. In case anyone looks at this in the future, the problem was that Next.js does not send cookies with
fetch()
even if you explicitly saycredentials: "include"
in your code. Instead, you have to manually send cookies via a Cookie header, as such: