Hi,
I followed the examples in the documentation.
The desktop application login is ok.
In the web application login, I get this error: XHR request failed.
Where do I have to correct it?
Thanks
Hi,
I followed the examples in the documentation.
The desktop application login is ok.
In the web application login, I get this error: XHR request failed.
Where do I have to correct it?
Thanks
@GIORGIO_BARTOLOMEO I think you have to add TSparkleCorsMiddleware to you SphinxServer.
Sphinx server and your Web app have 2 different URL, and the transfer between the two is forbidden by default for security reasons.
CorsMiddleware solves this issue.
In addition to @GHAZALI_Abdesselam contribution, it would help if you could provide more detailed information, usually the browser in developer console (F12) shows more info than just "XHR request failed".
Following the suggestions of @GHAZALI_Abdesselam, I set all in the right way. I added the Cors middleware, and now everything works.
I have to study how the Cors works and when it is necessary.
After trying some login features, I noticed the recovery password didn't work.
It doesn't send the code to set a new password. Can you give me the right way?
Thanks to @GHAZALI_Abdesselam and you, Wagner, for all your support.
I have to develop a web app with a database, and I'm new to this.
I hope to find all the amazing things the VCL has in web development.
Thanks again.
Note Sphinx doesn't effectively send an e-mail with the code. It fires an event given you the code (you can see it in Sphinx demo), and it's up to you to hook a handler to such event and send an e-mail with the code to the user.
@GIORGIO_BARTOLOMEO Let me suggest you read the following article by @wlandgraf about Cors on TMS XData. Don't forget that a Sphinx server is just an XData server specialized for authentication. So the article is relevant:
Thanks, Wagner. I took a look at the topic. Do you have a suggestion as to what component to use to email the customer? I tried Indy but have had some issues loading the SSL library. Does TMS have some kind of component that can help me? Could you tell me the right path to follow to develop a web app with a database where the customer connects to the app with his credentials, to make database operations?
I want to start with the right step.
Have a nice day.
It is a fascinating argument. I'll look into it further.
Thanks @GHAZALI_Abdesselam.