Single sign-on lets an application rely on another service to confirm a user’s identity. SAML and OpenID Connect are common ways to exchange that confirmation. The application still has to validate the message correctly and decide what the user may do after sign-in.
Understand the idea
Check the intended identity provider, the application receiving the response, and the message’s validity. Signatures, audience, destination, timing, and the link to the original sign-in request each matter in the relevant protocol. Use maintained libraries and provider guidance rather than inventing a validation process.
- Issuer
Confirm which identity provider is trusted.
- Message
Validate the protocol-specific contents and context.
- Session
Apply the intended account and access rules afterward.
A practical example
Imagine a staff portal accepting sign-ins from an approved provider. A configuration review finds that responses meant for a different application are not properly excluded. The team corrects the validation settings and tests both normal sign-in and rejected mismatches.

What to do next
- Confirm the sender. Accept identity messages only from the intended identity provider, using its trusted configuration and signing-key source.
- Confirm the destination and timing. Check that the response is meant for this application and is still valid. Follow the relevant protocol and library requirements.
- Connect the response to the request. Use the protocol’s required checks to link the response to the sign-in that started it and prevent inappropriate reuse.
- Check the account mapping. Confirm which application account the identity should open and what that account is allowed to do. Test rejected cases as well as successful login.
How to check the result
Keep provider-specific configuration and test results for the deployed version. Successful sign-in is one test; rejecting an inappropriate or expired response is another.
The signature is valid. Can we accept the message?
Check the intended recipient, issuer, timing, and request binding required by the protocol. A valid signature on a message for another application is not enough.
Sources and useful guides
The following resources provide background and more detailed guidance. Use the sections that match your service and situation.


