I would like to be able to click a link in Website A that will autofill a username and password into Website B.
Can anybody provide me some ideas how to do this with JavaScript or PHP?
Many thanks!
I would like to be able to click a link in Website A that will autofill a username and password into Website B.
Can anybody provide me some ideas how to do this with JavaScript or PHP?
Many thanks!
I am not sure what you mean by your question. Have you tried looking at OpenSocial or OpenID?
If you're able to edit website B, you can try to add a query string contains username and password to link and on website B get them from url and echo into input field's value attribute.
#Sample url on website A:
http://www.example.com/?username=admin&password=1234
#Simple sample form on website B:
<form>
<input type="text" value="<?php echo $_GET['username']; ?>" />
<input type="password" value="<?php echo $_GET['password']; ?>" />
<input type="submit" />
</form>
As someone else mentioned before the cleanest solution is to use a credential token.
Tweak this to your liking.