Hello Folks, I've integrated the Good data UI<...
# gooddata-ui
v
Hello Folks, I've integrated the Good data UI<Dashboard|Insights> in our application. The authentication is done via our app and good data is set up with the oidc. Gooddata UI is used via ContextDeferredAuthProvider. The App loads the dashboards correctly. Facing 2 specific issues and wanted help for the same. 1. When we open the dashboard page first time it says [NO SESSION] for sec and then redirects to oidc but as its authenticated returns back to the screen now if we open the page after this dashboard appears as usual its only the first time we observe the flicker 2. On logout the client is logged out from the Identity provider but if we manually enter the good data URL we see the previous session still exists. We are using Keycloak and the logout url is set to https://<domain>.cloud.gooddata.com/logout . It still doesn't work unless the logout is called manually from browser Thanks in advance
j
Hi Vinod, Before we proceed further, can you please confirm what type of SDK are you using and what version? Also, can you please record HAR files for both issues and send it to me in private message? I will then pass it for further investigation. Thanks
j
Hello Vinod, Thank you for bringing that to our attention. To investigate your problem we will need to understand how you are to connecting to the "backend" which is specified here:
Copy code
<BackendProvider backend={backend}>
Would it be possible to share? Thank you in advance.
v
Hi @Julius Kos @Jakub Talaj Sure hereby passing the code which is used as backend.
Copy code
import tigerFactory, {
  ContextDeferredAuthProvider,
  redirectToTigerAuthentication,
} from '@gooddata/sdk-backend-tiger';

export const backend = tigerFactory()
  .onHostname('<Good data URL hosted for us>') // this should be the domain where the GoodData Cloud or <http://GoodData.CN|GoodData.CN> is hosted
  .withAuthentication(
    new ContextDeferredAuthProvider(redirectToTigerAuthentication)
  );
As the user is already authenticated via the oidc before landing on this page leveraged the ContextDeferredAuthProvider. Gooddata is also configured with same oidc provider. Let me know if I'm missing something here.I followed a documentation from good data UI to get to this
d
Hi, We are missing 1 step đŸ™‚ In order to not being redirected (as is happening right now), the auth needs to be handle on your side. In the example sent (that is the one in our documentation), when the session is not authenticated, the application uses the built-in
redirectToTigerAuthentication
function to redirect the browser window to a location where the GoodData Cloud authentication flow starts. That’s why the first time is showing that message. For setting the auth context, please refer to this options: https://www.gooddata.com/docs/gooddata-ui/latest/learn/integrate_and_authenticate/cn_and_cloud_authentication/#GoodData.CNandCloudAuthentication-Contextdeferredauthentication
v
@Daniela Salmeron Thanks for the link. Apologies it took some time for me to come back as we had to upgrade our OIDC which took sometime. In summary I tried the approach and unfortunately I'm still facing this issue. We use keycloak as our OIDC and we have two client say abc which is our main app and abc-gooddata which is used for gooddata. The user logs in via abc and then we use a token-exchange (native to keycloak) to get token of abc-gooddata which Im passing in the backend of the provider as suggested. However in the oidc portal I can see the session with abc-goodata is connected. I will send you a video in one to one message so that you can have more context. Thanks