Hello,
I have a Sphinx service that works very well in desktop mode, and I'm trying to implement a TMS webcore version, starting with a small demo. But the Sphinx login screen never starts.
Here are the parameters used:
I found my error after a lot of searching. I didn't add cryptojs library (it would be easier to notify this in the sphinx manual).
Now, after successfully login, I get an 404 error message: "page not found : http://localhost:8000/Project1/?state=xxxxxxx&code=yyyyyyy
I am forgetting something again!
Remark: Setting Application.HandleOAuth to true of false do not change anything, in my case.
With redirectUri= http://localhost:8000/MyWebTest/MyWebTest.html it works, but not the first time. Let me explain:
When I run SphinxWebLogin1.Login, the login screen opens and my credentials are accepted, but the OnUserLogin event don't run. When I run SphinxWebLogin1.Login again, the login screen doesn't reopen (I'm already logged in) but the OnUserLogin event does run.
Do you see any errors in browser console the first time the application loads?
As a workaround, please try to set all properties and events in TSphinxWebLogin component from code, instead of setting it from the object inspector, and see if it solves the issue.
I don't get any error message on browser console. I get the same behaviour on Firefox, Chrome and Edge browsers (Windows 11)
I moved all properties and events from object inspector and set theme from code on FormCreate procedure.
I'm afraid you will have to create a small project reproducing the issue then, and please send to us.
Have you run the Sphinx demo, does it work for you?
Hi @GHAZALI_Abdesselam, there is no attachment in the message.
Also, please provide the exact steps to reproduce the issue - i.e, what should I do with your project?
I'm sorry. Here is the zip file: MyWebTest.zip (986.9 KB)
The project is very simple, with just a WebButton to execute the code to connect and a Webmemo to display the access token returned. I didn't send the server since I use the Sphinx server provided by the demo with specific client added:
In this specific case, you have to revert and set the properties in the object inspector. Then it will work automatically, because the properties would be already set when the application reloads.
If you want to keep the properties set from code, then you can simply call Login method again, it will do the automation and call the event if user is logged in.