Applies to all Pega Mobile Client™ versions
Symptoms
When you log in to Pega Mobile Client, you see the on-screen error Authentication failed and your device logs shows the detailed error {"errors":[{"ID":"invalid_client","message":"Client authentication failed "}]}.
Errors
On-screen error
Authentication failed
Device log error
{"errors":[{"ID":"invalid_client","message":"Client authentication failed "}]}
Explanation
The mobile device log error Client authentication failed means that the Pega Platform server (working as an OAuth 2.0 Authorization Server in this scenario) does not recognize the client_id/client_secret parameter pair presented by the mobile app. It means that there is no longer an OAuth 2.0 Client Registration data instance identified with given client_id value; or that there is still one, but its client_secret got regenerated and the mobile app is still using the old secret value. With any of the following situations the mobile app needs to be rebuilt from the Mobile Channel.
-
The registration was removed.
-
The client_secret parameter got regenerated.
-
During the update of the platform the old client registration code was not moved to the updated environment.
(Regeneration of the client_secret parameter is done from Registration rule form).
Regardless of the root cause, the Pega Mobile Client must be rebuilt as described in the Solution.
Solution
Follow these steps to resolve the Authentication failure when logging into Pega Mobile Client:
- First, simply rebuild the app from the Mobile Channel.
This is the least intrusive way to resolve or prevent the error. - If Step 1 does not work, create a temporary new Mobile Channel interface, save it, build the app, and test the app.
If the error persists, there is probably no available ruleset to save the Mobile Channel record to. - If the app built from the temporary Mobile Channel works, delete it, completing the following steps:
- Find an OAuth registration associated to the original Mobile Channel.
The naming pattern is <MOBILE_CHANNEL_NAME>_MobileClientRegistration_<GUID>_<GMT_TIMESTAMP>. - Delete it.
- Then save the Mobile Channel.
Make sure there is a ruleset available to save the Mobile Channel record.
This step creates from scratch a new OAuth registration. - Build the mobile app.
- Find an OAuth registration associated to the original Mobile Channel.
Related Content
Troubleshooting Pega Mobile Client connectivity, network, and firewall issues