- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 09-19-2024 01:46 PM
When implementing a custom login page in ServiceNow, you might encounter issues with Single Sign-On (SSO) redirection. A common problem is that after users provide their SSO details, they may be unexpectedly logged out instead of being successfully authenticated.
The Problem
- Unexpected Logout: Even if users are redirected correctly, after entering their SSO credentials, they might be logged out instead of being logged in. This issue can occur due to improper handling of the SSO authentication process.
The Solution
To resolve these issues, use the $window.location
object to ensure proper redirection and handle authentication correctly. Incorporate the following script into your widget’s client-side controller:
$window.location = "/login_with_sso.do?glide_sso_id=" + <IdentityProviderSysID>;
Replace <IdentityProviderSysID>
with the actual Sys ID of your Identity Provider. This script directs users to the SSO login page with the correct IdP configuration and helps manage the authentication process effectively.
Implementation Steps
- Update Widget Controller: Add a function to handle SSO redirection using the above script. This ensures users are directed to the IdP for authentication.
- Modify HTML: Ensure the SSO button triggers this function.
- Verify Sys ID: Confirm you’re using the correct
glide_sso_id
from your SSO Providers record.
Conclusion
By using $window.location
for SSO redirection and ensuring proper handling of the authentication process, you can resolve issues related to incorrect redirection and unexpected logouts. Implementing these changes will provide a smoother and more reliable login experience for users on your custom login page.
- 2,101 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is really helpful, Thank you
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thank You for Your Insightful Article
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thank you for your insightful article.