# Is there any Relay state concept in Okta OIDC similar like SAML integration

**URL:** <https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678>\
**Category:** OAuth/OIDC\
**Tags:** spring, react, java, reactjs, saml\
**Created:** [August 25, 2022, 3:28pm UTC](https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678 "2022-08-25T15:28:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohit1](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@rohit1](https://devforum.okta.com/u/rohit1)\
**Post date:** [August 25, 2022, 3:28pm UTC](https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678/1 "2022-08-25T15:28:49Z")

</div>

Hi  
SAML integration with okta uses relay state concept to redirect the user to the specific url specified in relay state parameters

How to achieve same thing in Okta OIDC with Spring boot and React js.  
In Okta documentation, I don’t see any similar type of concept(relay state) in Okta OIDC integration

---

<div class="post-metadata">

**Author:** ![rohit1](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@rohit1](https://devforum.okta.com/u/rohit1)\
**Post date:** [September 24, 2022, 1:56pm UTC](https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678/2 "2022-09-24T13:56:25Z")

</div>

It has been 30 days ,but not got any response from Okta support team.  
Can anyone from Okta team provide input on this?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [September 30, 2022, 8:43pm UTC](https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678/3 "2022-09-30T20:43:51Z")

</div>

OIDC doesn’t have the concept of a Relay State, You could look into using the state parameter to store that sort of information

---

<div class="post-metadata">

**Author:** ![michaelj](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@michaelj](https://devforum.okta.com/u/michaelj)\
**Post date:** [October 4, 2022, 12:29pm UTC](https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678/4 "2022-10-04T12:29:17Z")

</div>

Yes the state parameter is the recommended approach by the OIDC protocol. This is not something that is clearly discussed it would be nice if OKTA could provide a blog post on this. Basically when the redirect is done to the Authorization server the value that is stored in the state can have a reference pointer to some endpoint on your server side. On the trip back to your callback you can validate the state and redirect the user to the appropriate endpoint once they are authenticated.

---

<div class="post-metadata">

**Author:** ![rohit1](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@rohit1](https://devforum.okta.com/u/rohit1)\
**Post date:** [October 6, 2022, 3:20pm UTC](https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678/5 "2022-10-06T15:20:50Z")

</div>

@andrea Can you please tell any api’s which return same state parameter in response when user redirect to application after in okta hosted login/password setup .

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [October 10, 2022, 10:38pm UTC](https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678/6 "2022-10-10T22:38:34Z")

</div>

I don’t understand your follow up. The state parameter is returned back to an OIDC application, via the provided redirect\_uri, after said application redirects to Okta for the /authorize request.

You might want to check out our docs about [OIDC](https://developer.okta.com/docs/reference/api/oidc/) and the [/authorize endpoint](https://developer.okta.com/docs/reference/api/oidc/#authorize), as well as the different types of flows (step by steps for each flow found [here](https://developer.okta.com/docs/guides/implement-grant-type/authcodepkce/main/)), to understand OIDC better and where the state parameter comes into play

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [February 12, 2024, 10:12pm UTC](https://devforum.okta.com/t/is-there-any-relay-state-concept-in-okta-oidc-similar-like-saml-integration/21678/7 "2024-02-12T22:12:14Z")

</div>

Closed on February 12, 2024, 10:12pm UTC

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