Does OktaAuth work with React Native for Web?

My team is using React Native on the web with Expo and running into some issues when setting up Auth.

It seems that NativeModules.OktaSdkBridge is undefined when being called from the web so .createConfig is failing.

Am I doing something wrong or is this just not supported for now?

@krishna1 Hi, Can you please refer this doc and see if it works?
If looks like “NativeModules.OktaSdkBridge” should work

const mockGetIdToken = require('react-native').NativeModules.OktaSdkBridge.getIdToken;
    mockGetIdToken.mockImplementationOnce(() => {

Did you import {createConfig}?

Hi @krishna1 were you ever able to resolve this?

Hi @danishshaik, I was able to integrate okta in react-native-web. I was also searching for the solution across the web but couldn’t find anything and atlast had to create my own library based on react-native-web technology. Very easy to use and simple integration.

https://www.npmjs.com/package/okta-react-native-web

Just run npm i okta-react-native-web and follow the readme guide.

You can follow this link as well for more detailed guide

https://medium.com/@sehgalrishabh/deep-dive-into-integrating-okta-authentication-sdk-with-react-native-web-a-comprehensive-guide-a98305a7af13