SphinxWebLogin URL OID Configuraiton Call with wrong URL

Hi
By integrating web core sphinx client with a apache module for Sphinx, I discovered that when not testing on localhost (dev env) after loggedin event, I get a error about URL used to call OpenId configuration
It seems mixing URL of Sphinx server inside client URL in wrong way

Here for the WebSphinxClient
URL Authority = http://api-pp.xxxxxxxx.net/xxxxxxx/identity
but he calls

Sphinx.Web.Http.pas:68 
GET http://localhost:3001/xxxxxxxx/identity/.well-known/openid-configuration net::ERR_CONNECTION_REFUSED

in place of something like
api-pp.xxxxxxxxx.net/xxxxxxx/identity/.well-known/openid-configuration

Please can you check if there is a wrong setup somewhere (client side or server side) ?

Thanks

I assume you are talking about TSphinxWebLogin component?
How are you checking that it's requesting such URL? Are you inspecting the network request?
Have you tried logging the Authority URL to the console to confirm what you have there?

Hi Wagner
Yes it the TSphinxWebLogin component
All initial transaction use the URL Authority = http://api-pp.xxxxxxxx.net/xxxxxxx/identity then once logged there is an error when component tries to call

http://localhost:3001/xxxxxxxx/identity/.well-known/openid-configuration

In place of

http://api-pp.xxxxxxxxx.net/xxxxxxx/identity/.well-known/openid-configuration

hi Wagner
I think I get an idea about issue
I have to manage version for my webapp between Dev, PreProd (staging), Prod
Usually I'm using const to define URL and integrate value during creation of DataModule containing component (here a DataModule contains TSphinxWebLogin component).

I discovered that TSphinxWebLogin component was using URL value of component (defined with IDE) before DataModule Create event occurs enabling me to define the right URL in properties.

So I integrated in Data Module 3 TSphinxWebLogin for each environment, with right URL (authority, redirecturi).
And with compilation condition directive I define the one to use.

In PreProd environment, despite I'm using dedicated component to initiate login and catch logged events, it's the dev dedicated component which tried to call OID configuration, so with the wrong URI.

I will tried to test if I'm right this afternoon.
But, please, can you give me the best way to manage 3 different environment setup for TSphinxWebLogin, if possible with only one component ?

Thanks
Sylvain

I think easiest way is to have one data module with one TSphinxWebLogin component for each environment, and then you manually instantiate the correct data module for the environment you want to use.

Hi Wagner
I did it and it seems working
But I still get an error with an sync call to
http://localhost:3001/xxxxxxxx/identity/.well-known/openid-configuration

How the URL for OpenID configuration call is built (from where) ?
I would like to know if I need to investigate on TSphinxWebClient or in client configuration on Sphinx Server.

Thanks
Sylvain

It's as simple as combining the URL provided in the Authority property with the relative path .well-known/openid-configuration.

You can check it in unit Sparkle.OidcClient, in method TOidcClient.GetProviderMetadata, around line 332.