I'm not sure it's linked to Sphinx but mode WebCore but as it occurs when using TSphinxWebLogin I open it here.
I'm switching a one page Web core app with several webform
On the first page I put a TSphinxWebLogin component
When Login method is call I get an exception
Uncaught (in promise) ReferenceError: CryptoJS is not defined at Object.Sha256 (Sphinx.Utils.pas:233:1) at Object.CreateState (Sphinx.OidcClient.pas:224:32) at async Object.StartAuthorize (Sphinx.OidcClient.pas:431:20) at async Object.Login (Sphinx.WebLogin.pas:265:36)
It seems for a strange reason the code is applied in Pas2JS part, since the Sphinx.WebLogin
When I check code of WebLogin in IDE the part that appears to be processed at compilation isn't the PAS2JS
At end the error is fired by try to use CryptoJS which is defined in Pas2Js part of Sphinx.utils.pas.
Any idea about the reason it works in this wrong way ?
Note : same test using the webclient in demo works fine with same TSphinxWebLogin Component
Thanks for help