Client App panel Widget

We are working on a panel client app using Code Authorization OAuth and are receiving too many redirects. Before we go down the rabbit hole we wanted to confirm that using Code Authorization is acceptable within the panel.

I really appreciate any help you can provide.

Anthony

You can find documentation on the OAuth grant types, and descriptions of when to use them, here: https://developer.genesys.cloud/authorization/platform-auth/#authorization-types.

I assume this is a web app, right? If so, you should be using the implicit grant if it's a client-side app. Using the auth code grant for a client-side app is inappropriate because it will expose your client secret to all users of your web app. If it's a server-side app, like ASP.NET or PHP where you're making the Genesys Cloud API requests from the server, the auth code grant is appropriate because it can keep the client secret private on the server-side.

Hi Tim,

That is correct we want to keep the client secret private from the server side. We used the simple example from the resource you mentioned. When we run it outside of the panel it works fine. When we put it inside the panel we see a too many redirects error. We reviewed the network log and only the redirects needed to accomplish the Code Authorization grant type are being used. Is there something happening inside the panel that doesn't happen when I run this directly outside of Genesys?

Make sure you have the "preserve log" checkbox checked in the network tab. One or two redirects wouldn't cause your browser to display that error message. The most common cause of this is that your app isn't handling the auth response correctly and redirects the user back to the login URL after every auth response, causing an infinite loop.

Not that I'm aware of.

Thanks, we will have to head down the rabbit hole. Looking at the logs when running outside or inside look to have the same number of redirects. Thanks.

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