<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z000075wdlSCAQOkta Classic EngineAuthenticationAnswered2024-04-16T12:55:25.000Z2021-08-02T16:36:42.000Z2021-08-05T21:14:07.000Z

790yk (790yk) asked a question.

How to dynamically retrieve client ID in self hosted login widget?

We're currently using the Okta hosted login widget, but are transitioning to hosting it ourselves. In the Okta hosted page we're currently doing this to dynamically retrieve the client id for the target application:

 

 function getClientId() {

      if (!OktaUtil) return undefined;

   

      var requestContext = OktaUtil.getRequestContext();

      if (requestContext && requestContext.target && requestContext.target.clientId) {

        return requestContext.target.clientId;

      }

    }

 

Is there a way to access OktaUtil on self hosted page? Or a way different way to dynamically access the client id as the requests occur?

 


This question is closed.
Loading
How to dynamically retrieve client ID in self hosted login widget?