menu

Questions & Answers

PHP - interaction between two website by a same token

i'd like to provide a code in order to make a system between two php website.

The first website genarates a dynamic url which links to the second website. The url should be based on user-login data (token or query_strings or ...). after clicking the url by user, the user transmission to the second website and login automattically.

using a common database is reasonable? any idea

regards

I am looking for a idea for implementing this

Comments:
2023-01-07 20:29:26
token? cookies? are you trying to make a single sign-on? there are many ways to tackle this in php, wordpress for one had SAML plugin or something (not sure whether its free or not).
2023-01-07 20:29:26
A common database. A shared set of keys: public and private. Use in combination with json webtokens to ensure validity of the public key used. Save the private keys in database. Use https to ensure security (not foolproof as ...if someone shares the links, then you have a risk). Best is to communicate backend to backend over https to set a one time login link. Look at Oauth systems used by Google, FB, etc. and replicate something similar
Answers(0) :