I have two systems, an e-commerce and another web application that is used to customize the e-commerce product. The user logs into the e-commerce, chooses a product, and goes to the second system. We are using the universal login to authenticate the user, the first step is on the e-commerce and the second one is just to validate if the user is still authenticated, it uses the auth0 silent authentication and works properly.
Due to some internal changes, we decided to create our own login page and use the PHP SDK to do the integration.
The e-commerce is using the SDK in its latest version available here: auth0-PHP/README.md at main · auth0/auth0-PHP · GitHub
The second system is still using the angular version available here: @auth0/auth0-angular - npm
After that change, I can log in and log out from Auth0 using email and password, I can see the log on my dashboard everything looks okay. However, when I try to go to the second system, it is not working, the silent authentication returns an error, the log description shows Login required and the type is Failed Silent Auth
On the PHP side, I am able to receive the token and all the user information, if I check if the user is authenticated following the documentation approach: auth0-PHP/README.md at main · auth0/auth0-PHP · GitHub
$session = $auth0->getCredentials();
if ($session !== null) {
// The user is signed in.
}
It is not null, I have all the information.
To do the login, I am using:
$auth0->authentication()->login($email, $password, $realm);
It performs authentication successfully.
The SdkConfiguration has all the required information such as domain, clientId, clientSecret, audience, scope, etc.
Is there something missing to allow silent authentication on the second system to work? There was no change in the second system.
Version:
Angular - @auth0/auth0-angular - v1.3.1
PHP - SDK - v7.4 - Universal Login working
PHP - SDK 8.0 - - Custom Login not working