okta-auth-js
okta-auth-js copied to clipboard
getRequestContext() method not returning custom properties from OpenId Clients
Describe the bug?
When we use the OpenIdConnect Events in an MVC Client, we add custom parameters to the request using the event. The /authorize endpoint has the items in the URL, but that URL gets hidden in the okta hosted login page.
When calling OktaUtil.getRequestContext();
the items do not show up from our original request.
What is expected to happen?
I expect that all custom properties entered on the event to be available using the getRequestContext() method on the widget.
What is the actual behavior?
No properties show up
Reproduction Steps?
Use MVC sample, add custom property to OnRedirectToIdentityProvider event. Then after Okta hosted page loads, do the getReqeustContext()
method and see no properties show up in the JSON response.
SDK Versions
Widget version based on sources tab: 6.3.2 on Okta Hosted Login Page.
Execution Environment
Okta Hosted Widget - JS
Additional Information?
REF Issue on MVC SDK for more details Here
Authorize request Sample, it contains the custom property of 'productId' as we need. but once the page loads, the URL is gone and the getRequestContext()
method does not return it for us.
https://{oktaDomain}/oauth2/default/v1/authorize?client_id={clientId}&redirect_uri=https%3A%2F%2Flocalhost%3A44399%2FAuthenticationUserPortal%2Fauthorization-code%2Fcallback&response_type=code&scope=openid%20profile&code_challenge={codeChallenge}&code_challenge_method=S256&response_mode=form_post&nonce={nonce}&productId=1234&state={state}&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.10.0.0
Can you provide a code snippet of your use of OktaUtil.getRequestContext()
?
Hi @jaredperreault-okta I'm not totally sure what you mean, but we are editing the page from the Customization tab on the hosted page. So i'm just console.logging the .getRequestContext() to figure out where my properties are at.
Thanks for this report, we'll look into this internally
Internal Ref: OKTA-511534