FAQ: How to automatically log a user in to the Web Viewer using SSO

You can use the Safeguard ecommerce command action=get_customer_webviewer_ssourl to automatically log a user into the Web Viewer and optionally open a specific document.

This command generates a one-time login URL that bypasses the username and password request on the login page.  It logs the customer directly into the Web Viewer (without them having to enter any login credentials), and optionally opens a document.

  • The login URL can only be used once – once a customer has clicked on the URL it is consumed.  If you want to allow another login you must generate a new login URL again.
  • Login URLs are only available one slot at a time – if you generate an additional login URL for a customer before their first login URL has been consumed then the first login URL will be invalidated.
  • You can add the parameter &redoc=nnnn (where nnnn is the document ID number) to the end of the generated login URL string to open a specific document.
  • The login URL does not expire but it can be revoked if it has not already been consumed.

For detailed use of this command see the Safeguard ecommerce manual.

Opening a document directly after successful login

Once a user has logged in to the Web Viewer (either manually or automatically) you can call a document directly by specifying webviewer.php?doc= after the Web Viewer domain name as in the example below:

https://webviewer.com/webviewer.php?doc=249823