tms web core sphinx missing scopes

Hi,

i got an error when calling the Sphinx.Login --> Authorizationerror : Client have not been granted scopes: openid, email.

on my client the scopes are set, as well as on my server.

what could be the issue?

best regards
fabian

You must add such scopes (opened, email) to the list of valid scopes of the client you registered server-side.
The client app is requesting such scopes, but in the configured client application they are not valid.

Reference:
https://doc.tmssoftware.com/biz/sphinx/guide/web-apps.html#registering-a-client-application

  Client.ValidScopes.Add('openid');
  Client.ValidScopes.Add('email');

i figured so. im basically using the demo and my custom webclient:

server:


  // Create web client
  Client := SphinxConfig1.Clients.Add;
  Client.ClientId := 'web';
  Client.DisplayName := 'My App';
  Client.RedirectUris.Add('http://localhost:2001/tms/WebClient/');
  Client.RequireClientSecret := False;
  Client.AllowedGrantTypes := [TGrantType.gtAuthorizationCode];
  Client.ValidScopes.Add('openid');
  Client.ValidScopes.Add('email');

on client side clientID is configured with 'web' too, as well as scoped openid and email

It's not clear to me if you have now solved this issue? If not, please provide more details about the server and the client, maybe provide the test projects.

Hey Wagner,

i could not solve the issue, even tho i think i have all scopes correctly in place.
i uploaded you the small project here. Would be great if you could have a look.

thank you a lot in advance.

best regards

I don't know why and how the Scope property of the SphinxWebLogin1 component had #13#10 characters separating openid and email.

Just delete such value from property in object inspector and retype it again the correct way, which is openid email (a space between the words). It should work.

thank you! sometimes its as easy as that.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.