Sending authenticated ajax from another domain

28 views Asked by At

Maybe this is not possible...

I have one site, we'll call it club.com

And I have another site called store.com

I have control of both domains. club.com is powered by a Django project, and store.com is a shopify site.

If you're a member of club.com, you get a discount on store.com

We want to do it so that integration is seamless. No need to enter your club.com credentials to store.com, we want the page to do that for you.

How do I implement this?

I already tried simply putting an ajax call on store.com pointing to club.com, and it seems to work with one exception: The browser is not sending the proper cookies along with the request, so when club.com gets this ajax request it can't authenticate it.

1

There are 1 answers

0
Jairo R. Flores On

You should consider OAuth2 to achieve what you need.