# How to use Okta react native sdk and external idps?

**URL:** <https://devforum.okta.com/t/how-to-use-okta-react-native-sdk-and-external-idps/14671>\
**Category:** Questions\
**Created:** [June 10, 2021, 8:14pm UTC](https://devforum.okta.com/t/how-to-use-okta-react-native-sdk-and-external-idps/14671 "2021-06-10T20:14:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjcbt](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@jjcbt](https://devforum.okta.com/u/jjcbt)\
**Post date:** [June 10, 2021, 8:14pm UTC](https://devforum.okta.com/t/how-to-use-okta-react-native-sdk-and-external-idps/14671/1 "2021-06-10T20:14:15Z")

</div>

We are using the okta react native sdk. We have a few external idps we redirect to for certain users. The okta sign in widget on our web pages handles these fine with IDP discovery turned on. The okta react native sdk doesn’t appear to have this option for custom sign in. I’m assuming to get the idp redirection to work we would have to use the broswer sign in? Is there a way to get that idp discovery to work with a custom sign options?

---

<div class="post-metadata">

**Author:** ![Lijia](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/lijia/32/2295_2.png) [@Lijia](https://devforum.okta.com/u/Lijia)\
**Post date:** [June 10, 2021, 9:38pm UTC](https://devforum.okta.com/t/how-to-use-okta-react-native-sdk-and-external-idps/14671/2 "2021-06-10T21:38:26Z")

</div>

@jjcbt Are you referring the below Okta react native sdk? The [sdk](https://github.com/okta/okta-react-native#custom-sign-in) does include custom sign in and browser sign in.

Please refer the below logic:

> <https://github.com/okta/okta-signin-widget/blob/master/src/models/IDPDiscovery.js#L53>

The basic flow would be:

- [GitHub - okta/okta-auth-js: The official js wrapper around Okta's auth API](https://github.com/okta/okta-auth-js/#webfingeroptions)
- [GitHub - okta/okta-react-native: OIDC enablement for React Native applications](https://github.com/okta/okta-react-native#browser-sign-in)

You don’t **need** to use auth-js to do this, as it’s a public API. [WebFinger | Okta Developer](https://developer.okta.com/docs/reference/api/webfinger/)

Please have a try if this idea works.

---

<div class="post-metadata">

**Author:** ![jjcbt](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@jjcbt](https://devforum.okta.com/u/jjcbt)\
**Post date:** [June 10, 2021, 10:35pm UTC](https://devforum.okta.com/t/how-to-use-okta-react-native-sdk-and-external-idps/14671/4 "2021-06-10T22:35:26Z")

</div>

So if I understand correctly, our custom login screen would take the email, and use the web finger api to see if the user needs to use an external idp. If the user does then we would have to use the signInWithBrowser({ idp: ‘your\_idp\_here’ }); option with the react native sdk?

---

<div class="post-metadata">

**Author:** ![Arron](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/arron/32/3274_2.png) [@Arron](https://devforum.okta.com/u/Arron)\
**Post date:** [September 1, 2021, 12:28pm UTC](https://devforum.okta.com/t/how-to-use-okta-react-native-sdk-and-external-idps/14671/5 "2021-09-01T12:28:20Z")

</div>

@jjcbt did the described approach work for you in the end?

---

<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:** [February 10, 2024, 12:55am UTC](https://devforum.okta.com/t/how-to-use-okta-react-native-sdk-and-external-idps/14671/6 "2024-02-10T00:55:22Z")

</div>


