Jump to content

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.

Edited by ignace
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.