# Okta login with Firebase authentication on Expo project

**URL:** <https://devforum.okta.com/t/okta-login-with-firebase-authentication-on-expo-project/28941>\
**Category:** Questions\
**Tags:** react-native, mobile\
**Created:** [June 24, 2024, 12:48am UTC](https://devforum.okta.com/t/okta-login-with-firebase-authentication-on-expo-project/28941 "2024-06-24T00:48:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joh](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@joh](https://devforum.okta.com/u/joh)\
**Post date:** [June 24, 2024, 12:48am UTC](https://devforum.okta.com/t/okta-login-with-firebase-authentication-on-expo-project/28941/1 "2024-06-24T00:48:37Z")

</div>

Hello! I am trying to implement Okta SSO login with Firebase authentication in react native application that is using expo. I was following the documentation from react-native-firebase, which uses `react-native-app-auth` and `react-native-firebase`. However, when I added `react-native-app-auth` to the project, the Android build failed and the iOS app crashed when a function from `react-native-app-auth` was called.

I think this is because `react-native-app-auth` requires some native code setup, as explained in the introduction file in the github repository, which I don’t think is directly possible with Expo. Is there a way I can use `react-native-app-auth` in an Expo project?

I also explored using `expo-auth-session` but I encountered the following error:

```auto
Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. Some specific scenarios are - 
1) Using IDP-Initiated SAML SSO. 
2) Using signInWithRedirect in a storage-partitioned browser environment

```

I couldn’t figure out why exactly this was happening, but it may be because the `expo-auth-session` library doesn’t account for Firebase authentication.

I think the ideal solution is using `react-native-app-auth` as mentioned in the first documentation. Is there a way to set this up in an Expo project? I would greatly appreciate any thoughts on this since I have been stuck on this for a few days. Thank you!

---

<div class="post-metadata">

**Author:** ![piyusha](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@piyusha](https://devforum.okta.com/u/piyusha)\
**Post date:** [July 10, 2024, 10:48pm UTC](https://devforum.okta.com/t/okta-login-with-firebase-authentication-on-expo-project/28941/2 "2024-07-10T22:48:06Z")

</div>

Hello! You might be able to use `react-native-app-auth` with the expo-linking library. You can also set up native code in Expo apps using the command `npx expo prebuild`. Please see this guide: [Authentication with OAuth or OpenID providers - Expo Documentation](https://docs.expo.dev/guides/authentication/#okta)

---

<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:** [August 9, 2024, 10:48pm UTC](https://devforum.okta.com/t/okta-login-with-firebase-authentication-on-expo-project/28941/3 "2024-08-09T22:48:41Z")

</div>

Closed on August 9, 2024, 10:48pm UTC

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