David Elmakias
03/04/2026, 1:33 PMDevRev
03/04/2026, 1:33 PMClient ID: Your Project ID (from Descope Project Settings)
Client Secret: Access Key (create one in Descope Access Keys)
Authority: Authorization URL (from your Descope Federated App)
Step 3: Customize JWT Claims (Optional)
If Document360 requires specific user attributes in the JWT, create a JWT Template in Descope:
{
"email": "{{user.email}}",
"name": "{{user.name}}",
"sub": "{{user.userId}}"
}
• Configure custom claims in Project Settings → JWT Templates
• Add any user attributes Document360 expects for user provisioning
JWT Templates | Descope Documentation
Custom Claims Overview | Descope Documentation
Document360 OIDC Setup | Descope DocumentationDavid Elmakias
03/04/2026, 1:35 PMDevRev
03/04/2026, 1:35 PM// Validate Descope JWTs in your API endpoints
const jwt = require('jsonwebtoken');
const jwksClient = require('jwks-rsa');
const client = jwksClient({
jwksUri: `<https://api.descope.com/v2/keys/${PROJECT_ID}>`
});
function getKey(header, callback) {
client.getSigningKey(header.kid, (err, key) => {
const signingKey = key.publicKey || key.rsaPublicKey;
callback(null, signingKey);
});
}
// Verify JWT in your routes
jwt.verify(token, getKey, { algorithms: ['RS256'] }, (err, decoded) => {
// User is authenticated
});
2. User Context Sharing (optional):
If you need to pass user data to Document360, ensure your JWT template includes the required claims.
No Additional Backend Work Needed
• Document360 authenticates directly with Descope via OIDC
• Your existing Descope JWT validation remains unchanged
• No new API endpoints required for the SSO flow
The SSO happens between Document360 and Descope - your backend just continues validating JWTs as normal.David Elmakias
03/04/2026, 1:39 PMconst token = authHeader.split(' ')[1];
const validationResponse = await descope.validateSession(token);
does it matter?
or should we simply add an endpoint to JWT Validation as you shoed in the previous message?DevRev
03/04/2026, 1:39 PMdescope.validateSession() is actually the recommended approach over manual JWT validation.
Why validateSession() is Better
// Your current approach (recommended)
const token = authHeader.split(' ')[1];
const validationResponse = await descope.validateSession(token);
Benefits:
• Handles token refresh automatically
• Validates against revoked sessions
• Built-in error handling
• Descope SDK manages JWKS rotation
Manual JWT Validation Drawbacks
// Manual approach (not recommended for your case)
jwt.verify(token, getKey, { algorithms: ['RS256'] }, callback);
Issues:
• No session revocation checking
• Manual JWKS key rotation handling
• More code to maintain
For Document360 SSO
Your existing validateSession() backend validation works perfectly. Document360 will:
1. Redirect users to Descope for auth
2. Receive JWTs directly from Descope
3. Your backend continues using the same validation
No changes needed to your current authentication flow.David Elmakias
03/04/2026, 1:41 PMDevRev
03/04/2026, 1:41 PMdescope.validateSession(token)
• Document360 authenticates directly with Descope via OIDC
That's it. Your users will have seamless SSO from your app to Document360 using the same Descope authentication.David Elmakias
03/04/2026, 1:46 PMDevRev
03/04/2026, 1:46 PM{
"iss": "<https://api.descope.com>",
"aud": "document360_audience",
"sub": "{{user.userId}}",
"email": "{{user.email}}",
"name": "{{user.name}}"
}
4. Configure Document360
• Use your Descope Project ID, Access Key, and OIDC endpoints
• Point to your custom JWT template
Thanks for catching that error - the generic OIDC approach is the correct path for Document360 integration.Nick Rodriguez
03/04/2026, 3:05 PMDavid Elmakias
03/09/2026, 4:28 PMNick Rodriguez
03/09/2026, 4:37 PMDavid Elmakias
03/09/2026, 4:59 PMDavid Elmakias
03/09/2026, 5:09 PMNick Rodriguez
03/09/2026, 5:13 PMNick Rodriguez
03/09/2026, 7:22 PM