I created a Sphinx server as described in the documentation. Have this tested as described via ".. /.well-known/openid-configuration" and I get the JSON message back. Ok, works!.
After that, I did the next step and added the database files as described and registering a client application. If I now start the Sphinx server, the tables are created, the server shows running.
But after insert the URL "...&redirect_uri=http://127.0.0.1" as an answer I don't get the login screen, but the start screen of Windows IIS. I cannot deactivate IIS on my computer because it is used for other programs. What can I do?
I testet a lot of things and now the server send me:
Auth server
An error ocurred.
Server returned the following error: unauthorized_client: Parameter redirect_uri is invalid: http://127.0.0.1:8010/oauth2redirect
But "http://127.0.0.1" is set as my REDIRECT_URI.
So, why do I get this error message?
Hello Wagner,
I was able to solve the problem.
It was not due to the "TMS Sphinx" but to the Devart SqLite UniConnection I used.
There I had the "LockingMode" on "Exclusive".
After changing to "Normal" mode, the problem with the "redirect_uri" no longer occurred.
The login window will now open correctly.
But I have another problem.
After logging in, I immediately get the message "Id Token is expired".
Hello Wagner,
below is the desired information about my Sphinx app:
I used the demo you supplied. Use Devart's SQLLite (SQLiteDac) instead of SQLLite from Embarcadero.
The server application runs on a virtual Internet server.
The data exchange runs over an HTTPS (see attached screenshot TMSHTTPConfig)
The Connection String from UNIConnection:
Provider Name=SQLite;Direct=True;Force Create Database=True;Use Unicode=True;Integer As LargeInt=True;Locking Mode=Normal;Login Prompt=False
When I start the client app, the login takes place.
If the user is not registered, I can register the user with his password. It works.
Then I log in with the user in the client app and immediately receive the message "Application authorization failed - Id token is expired" (see attachment)
I hope you can do something with the information and help me further.
Thank you in advance
Andreas
procedure TForm7.ConfigureClients;
var
Client: TSphinxClientApp;
begin
// The following properties can be simply set at design-time using the TSphinxConfig.Clients property
// We keep it in the code here for learning purposes
If original Sphinx demo works, can you please send your full modified project so we can debug and trace?
Can you please check your browser network tab and find the request where the identity token is returned? Then also please let me know the exact date/time of your computer at that time.
Hello Wagner,
Mea Culpa.
It was the time setting. On my virtual server, the time was 1 hour back. Thus, a login was of course not possible. The server had the wrong internet time. But I hadn't paid attention to it until your hint to check the time.
Sphinx and Login now work's fine.
The login page is a browser page.
After a successful login, it is displayed that I can close the window and then get the tokens displayed in the memo.
2 questions:
Can I close the browser window automatically after successful login?
How do I get the login window displayed in another language?
No, the browser can't be closed automatically after login.
Maybe - maybe - you can do lots of Window messaging workarounds from your app to close the browser window after you received the access token, but that would be a big kludge and I wouldn't recommend it. Remember that the user might have other tabs open in the browser, and who knows which browser he's using.
Regarding the language, yes, it's possible, would you mind asking this in a different topic?