Login issue using Sphinx

This issue is encountered after calling SphinxWebLogin.Login. An exception is created when logging into an account with the surname Doñate. The exception is created inside Sphinx.Utils.GetJwtPayload. The example project takes the code from GetJwtPayload and uses it to parse a two tokens, one with a user name containing only alphanumeric characters and the other with the surname Doñate. The first is successful and the second produces an exception "The string to be decoded is not correctly encoded". Inside Sphinx.Utils.GetJwtPayload, that exception is caught and rethrown as "Token payload is not a valid JSON".

Note that this problem is only encountered in WebCore (when "PAS2JS" is defined). When Sphinx is used in Delphi applications, both tokens are parsed successfully.

Here is the demo project for checking:

73 ParseToken.zip (1.6 MB)

Thanks,

Thank you very much for the report and the sample project reproducing the issue.

We could reproduce and fix the problem. Next version will include the fix in GetJwtPayload.