- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 10:44 AM
If i provide a link to the homepage a service portal i created, how can i guarantee that the user session actually begins?
I have server scripts that check for information about the user's session (gs.hasRole, gs.getUserID()), but they dont work if the session doesnt actually begin. The links to the page just bring the user to the page without logging them in.
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 09:34 PM
A HI ticket did the trick. I had to set the public page for $sp to false IN ADDITION to setting the public page for $my_new_service_portal to false (i had only performed the latter, not thinking that $sp would have any bearing on the other portal).
Now, any direct link to one of the pages on $my_new_service_portal will log the user in via SSO first (if they aren't already) and then route them to the requested page.
Thanks again for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 10:46 AM
Have you thought about using gs.getSession().isLoggedIn() in the server script?
http://wiki.servicenow.com/index.php?title=GlideSession#isLoggedIn.28.29
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 10:50 AM
I'm sorry. i should be more clear.
Your suggestion will merely tell me that they are logged in.
I am looking for a way to make sure it happens.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 10:54 AM
Sorry for the confusion...
I am looking for a way to make sure it happens.
Make sure what happens exactly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2017 10:57 AM
Make sure that user logs in, not just checks that they are logged in