Sign-in Source Reference
The signed backend check request, Your keys claims, and the key-pair command.
On this page7 sections
Sign-in Source Reference
The exact contracts behind the three sign-in sources: the signed check request Gydr sends to your backend, and the key and claims a Your keys source expects.
Your backend: the check request
Gydr sends one POST with an empty body to your check URL. The URL must be https (no IP addresses, no redirects) and answer within 3 seconds.
The signature proves the call is Gydr’s. Compute it with your secret exactly like this, and compare in constant time:
- Refuse a request when
|now − t|is more than 300 seconds. - Accept any of the listed
v1values: during a secret rotation Gydr sends both versions. - Answer with
Cache-Control: no-store. A200that carries anAgeheader or a public cache directive is refused.
What to answer
- Your answer
200with{ "userId": "42", "name"?, "email"?, "expiresIn"? }- Meaning for Gydr
- Signed in. JSON of at most 4 KB with no other members;
userIdis a string of 1 to 255 printable characters.
- Your answer
401- Meaning for Gydr
- Not signed in. Cached for 60 seconds; the visitor is a guest.
- Your answer
403- Meaning for Gydr
- “I refuse your signature”. Reported as
bad_signaturewith an operator alert — and never a sign-out.
- Your answer
- Timeout, 5xx
- Meaning for Gydr
check_unavailable. Gydr keeps the visitor signed in on the same token for a short grace period.
- Your answer
- Anything else
- Meaning for Gydr
misconfigured.
Verify and answer
Activate, rotate, retire
- Activate. The Console sends a probe carrying
Gydr-Challenge; your endpoint answers{ "challenge": hex(HMAC(secret, challenge)) }. The snippets above already do. A source works only after a probe passes, and any edit of the check URL deactivates it until a new probe passes. - Rotate. Rotating issues a new secret (shown once) and Gydr signs every request with both until you press Retire the old secret, so rotation signs nobody out.
- Egress. Gydr calls from fixed addresses, listed in Console → Settings → Visitor sign-in, if you allow-list.
Your keys: claims and the key-pair command
A Your keys source accepts RS256, ES256 or EdDSA JWTs. The token must carry:
- Claim
iss- Required
- Yes
- Notes
- Must equal the issuer you registered.
- Claim
aud/azp/client_id- Required
- Required for a JWKS URL; optional for a pasted key
- Notes
- One of them must equal the audience you registered.
- Claim
sub- Required
- Yes
- Notes
- The User ID, unless you name another claim. 1 to 255 printable characters; it must never change for the same person.
- Claim
exp- Required
- Yes
- Notes
- At most 24 hours after the token was issued; about 1 hour is typical.
- Claim
name,email,phone_number- Required
- No
- Notes
- Used to fill the visitor's details where empty. Phone is read from phone_number, or from phone when phone_number is absent.
- Claim
is_anonymous,firebase.sign_in_provider- Required
- No
- Notes
- A token for an anonymous session (is_anonymous: true, or a Firebase anonymous sign-in) never signs a visitor in: the visitor stays a guest.
Limits Gydr enforces
crit, jku, jwk, x5u or x5c are refused, and up to 60 seconds of clock difference is allowed. The issuer, JWKS URL and any URL you register must be https.Sign your own token
For a site with cookie sessions and no identity provider. Create a key pair once, paste the public key in the Console, and keep the private key on your server:
Register the issuer (https://www.example.com above) and the public key; the audience is optional for a pasted key. This is the “recognise people only” setup: no plugin receives the token.
Try it on your own site
Create a free account and publish your first chatbot in minutes.

