How to detect SSO login in PHP AUth0 SDK

How do i detect the sso login session from other application in my second application which is in PHP and uses the Auth0 SDK?

From what i’ve tested it only detects when i actually try to visit the $auth0->login() url.
If i dont visit that it wont know at all.

Is it possible to curl the authorize endpoint and determine i have a session or something?

Hi @sam15

Welcome to the Auth0 Community!

I am sorry about the late reply to your post!

As you have stated, without checking if the user got redirected to the /authorize endpoint or redirected for login whenever they access the page, you cannot detect if they login via SSO or if they just have a persisting session from a previous SSO/login.

My best advise would be to treat any logins that are not made through a redirect or calls made via the getAccessToken() function as SSO, even though this might not be ideal due to the fact that they might just have a persisting session as stated above.

If you have any other questions, feel free to leave a reply or post again on the community!

Kind Regards,
Nik

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.