John Davidson

php - SSO Logout and login issue

0 comments
Message:


I am trying to do a login functionality using SSO.
I have done login and logout successfully.


Problem is that I need to redirect to SSO login page at the time of logout from my application. It is done, but now when I paste my application url in the browser, it redirects me to SSO login page rather than my application page.


If I remove the cookie from the browser through settings, it will redirect me to my application login


I have tried to remove cookies through code but no luck,
Yii::$app->response->cookies->remove('XYZ', true);


Can any one please direct me to the right way?


We can't able to login to my application unless clear browser cookie / reopen browser


Framework Yii1
library used: oneLogin



My Answer:
user->response->cookies->remove('cookie_name');

This code should remove the cookie named 'cookie_name' from the browser. Make sure you are using the correct cookie name in your code. If this code is not working, you may need to check if the cookie is being set correctly in the first place.

If you are still facing issues with the login/logout functionality, you may need to check your SSO configuration and make sure that the redirection URLs are set up correctly. Additionally, you may need to check if there are any other cookies or session variables that are causing the redirection to the SSO login page.

If you are still facing issues, you may need to debug your code further and possibly seek help from a developer or a forum for assistance.

Rate this post

3 of 5 based on 2543 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us