When using SAML2 authentication, you may encounter this error. The error is caused by a change to the Identity Provider settings which means that the SimpleSAMLphp library is unable to validate the signature from the key.
The process to resolve this is to refresh the metadata from the Identity Provider. This is done as follows:
- Site administration --> Plugins --> Auth --> SAML2
- Set "IdP Metadata Refresh" to "Yes" and save changes
- Site administration --> Server --> Scheduled tasks
- Locate "Metadata refresh task"
- Click "run now"* Confirm when prompted
- Click continue
- Site administration --> Plugins --> Auth --> SAML2
- Set "IdP Metadata Refresh" back to "No" and save changes