# Okta React SAML Integration

**URL:** <https://devforum.okta.com/t/okta-react-saml-integration/8622>\
**Category:** SAML\
**Created:** [March 26, 2020, 10:25pm UTC](https://devforum.okta.com/t/okta-react-saml-integration/8622 "2020-03-26T22:25:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiaxing](https://avatars.discourse-cdn.com/v4/letter/j/7cd45c/32.png) [@jiaxing](https://devforum.okta.com/u/jiaxing)\
**Post date:** [March 26, 2020, 10:25pm UTC](https://devforum.okta.com/t/okta-react-saml-integration/8622/1 "2020-03-26T22:25:58Z")

</div>

I am trying to use Okta as the identity provider for SAML2.0 in order to talk to AWS STS. This requires Okta to provide SAML assertion so that my application can pass the assertion to AWS. I can find react code to login and redirect pages but I can’t find the way to fetch this SAML assertion after login. How can I do this in React? Thanks!

---

<div class="post-metadata">

**Author:** ![dragos](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dragos/32/1313_2.png) [@dragos](https://devforum.okta.com/u/dragos)\
**Post date:** [March 27, 2020, 12:22am UTC](https://devforum.okta.com/t/okta-react-saml-integration/8622/2 "2020-03-27T00:22:28Z")

</div>

Hi @jiaxing

The SAML assertion is generated on /app/ endpoint which is not CORS enabled. The best solution would be to use a back-end or api gateway to retrieve the SAML assertion through the back-end channel and then pass it to the front-end channel inside the React application.

---

<div class="post-metadata">

**Author:** ![adil](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@adil](https://devforum.okta.com/u/adil)\
**Post date:** [December 2, 2020, 11:37am UTC](https://devforum.okta.com/t/okta-react-saml-integration/8622/3 "2020-12-02T11:37:15Z")

</div>

@jiaxing do you mind sharing the react code or any sample authentication of SAML 2.0 with react application.

Looking forward to you.

Regards  
Adil

---

<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:** [January 19, 2024, 12:58am UTC](https://devforum.okta.com/t/okta-react-saml-integration/8622/4 "2024-01-19T00:58:19Z")

</div>

Closed on January 19, 2024, 12:58am UTC

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