Jump to content

Cross Domain user authentication.


njdubois

Recommended Posts

I remember reading up on this a few years back and determined that it was to much work to make worth while.

 

My client is currently partnering with another service.  They will have a link to our service on their site.  The user logs in there, we don't want them to have to log in here.

 

I'm pretty sure this can be done with cookies.  Is there any other way to do this?

 

I was thinking about passing something in the URL

 

maybe www.oursite.com?user=md5($username . $password)

 

And saving md5(username . password) in out database and using that to authenticate the user.

 

Do I have any other options?  Is there an easy way to do this?

 

Thanks for the help!

 

Nick

Link to comment
https://forums.phpfreaks.com/topic/283126-cross-domain-user-authentication/
Share on other sites

I'm pretty sure this can be done with cookies.

No, it won't. You can't access cookies from another domain. You can however use AJAX to an external source or include an external *.js file through <script/> to get the user's login info.

 

The other domain however will have to allow you to make these calls using Access-Control-Allow-Origin.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.