GetSupportX
Portal sign-in docs
Portal sign-in

Security

Signing customers in from your website is safe as long as two things hold: your secret key stays on your server, and your site only vouches for customers who really are logged in.

What the secret key protects

Your website uses the secret key to prove who a customer is. Anyone who has it can sign in to your portal as any of your customers and read their requests. Treat it like a password.

We store it encrypted and show it once, when it’s created. If you lose it, we can’t show it again: replace it and put the new one in your site.

Keep it on your server

The key belongs only in code that runs on your server:

  • An environment variable (GSX_SSO_SECRET in every guide), or the GetSupportX plugin’s settings on WordPress.
  • On WordPress without the plugin, your child theme’s functions.php, which runs on your server.

Never put it where visitors can see it

Not in theme or page JavaScript, a Shopify theme, a site builder’s custom code box, a mobile app or browser extension, or a public code repository. Anything a browser downloads can be read by anyone. When you hand setup to a developer, send them this page and your callback URL; give them the key the way you’d share any password.

Replacing or removing the key

In Settings → Help center & portal → Portal sign-in, Replace creates a new key and the old one stops working at that moment:

  • Sign-ins through your website are refused until the new key is in your site’s code (Check it works shows “the signature didn’t match”).
  • With the WordPress plugin, portal sign-in and the plugin’s order lookups stop until you click Connect again in WordPress.
  • Customers who are already signed in stay signed in.

Replace it if it may have leaked: pasted in a chat or email, committed to code, or known to someone who has left. Remove turns sign-in through your website off until you create a new key, and hides the portal’s button meanwhile.

Only vouch for logged-in customers

Your code is the gatekeeper: whatever it signs, we trust. It must sign in only customers who are logged in to your site, and send everyone else to log in first. The guides’ code does this.

Test sign-in checks it from the outside: it opens your sign-in link as a visitor with no account, and warns you if that visitor is sent straight into the portal.

Send only confirmed email addresses

The email your site sends is trusted

If it matches a customer who wrote to you before (and isn’t linked to another account on your site), the person signing in is linked to that customer and sees their earlier requests. So only send emails your site has confirmed.

If your site lets people sign up without confirming their email, someone could register with a stranger’s address and read that stranger’s requests. Send email only once your site has confirmed it, or leave it out for unconfirmed accounts: the id still identifies them.

On WordPress or WooCommerce, check your own registration settings to see whether new accounts have to confirm their email. The plugin and the WordPress code send the account’s email.

Short-lived, one-time links

A signed link is like a key to one customer’s portal, so we limit it twice: it expires within 10 minutes (the guides use 5), and it works once. Any later use of the same link is refused, even with the letters of its signature re-cased. The guides’ code puts a fresh random id (jti) in every link. Customers see one short message and can still sign in with an emailed link; the reason shows only to you.

Never cache the sign-in link

The answer from your sign-in link is a redirect carrying one customer’s signed link. If a page cache or CDN kept it, the next visitor could be handed the same redirect, and if they got there first they would be signed in as that customer.

  • Every guide’s code sends Cache-Control: no-store (WordPress: nocache_headers()). Keep it if you change the code.
  • Exclude your sign-in link from caching plugins and CDN cache rules.
  • Repeated “the same link was used twice” failures in Check it works usually mean something is caching it.

What the redirect parameter can and can’t do

The redirect parameter (and the gsx_return your portal adds to the sign-in link) is not signed, so we treat it as untrusted.

  • It can choose which page inside your portal a signed-in customer lands on.
  • It can’t send anyone to another website or another part of GetSupportX: anything that isn’t a plain path inside your portal lands on the portal home.
  • It can’t change who is signed in, and it can’t make an invalid link valid.

The exact rules are in the protocol reference.

Several websites on one workspace

Two websites both have a “user 5”. If both send a bare 5, those two people would share one customer record. The guides prefix ids with the site and send site, so they stay apart. Customer ids

Signing in with your login provider (OIDC)

With Sign in with your login provider, there is no secret key on your website: your provider signs the customer in, and we check its answer.

  • Your provider’s client secret is stored encrypted and never shown again. Settings only says one is saved; to change it, paste a new one.
  • Every ID token is checked before anyone is signed in: its signature against your provider’s published public keys (asymmetric algorithms only; HS256 and unsigned tokens are refused), the issuer, that it was made for your client ID alone, that it belongs to this sign-in (nonce), and that it hasn’t expired. PKCE and state stop a sign-in being hijacked or slipped into someone else’s browser. Every check
  • We keep and match the email only when your provider says it is verified. An unverified email is never stored or used to find a customer.
  • Linking a verified email to the customer who already has it (and their earlier requests) is the same trust the portal already gives the emailed sign-in link: whoever can read that mailbox can sign in with the link anyway.
  • Who can sign in is up to your provider: anyone who can log in to the app you created there can open your portal as themselves. If your provider lets anyone sign up, anyone can.
  • Switching it off or clicking Remove in Settings → Help center & portal → Portal sign-in stops the button at once, and any sign-in still under way is refused. Remove also deletes the saved client secret. Customers who are already signed in stay signed in.

Read next