Build a React Native Application and Authenticate with OAuth 2.0

Matt Raible

I believe you have to use a custom domain and customize the hosted Sign-In Widget for this to work.

Nury Garryyev

Is it possible to create a mobile app with a hosted login page without redirecting it to the Okta login page?
If yes, do you have a tutorial or documentation that will help to implement the mobile app with Okta hosted login page?

Matt Raible

Yes. See our React native documentation.

Will Mruzek

Is there a way to achieve OIDC/OAuth2 authentication through JS only? I’m attempting to set up Okta authentication for a React Native Windows app, which is not supported by Formidable’s react-native-app-auth. Is there a reason there needs to be a native component at all?

Any help would be appreciated. Thanks!

Matt Raible

Hello Will,

I don’t know because I haven’t tried to use our React SDK in a React Native environment.

Most of our JS SDKs are built on top of Okta Auth JS.

Since this blog post was written, we’ve released our own React Native SDK. I’m not sure if it works on Windows. You can see my blog post about how to use it in Create a React Native App with Login in 10 Minutes.

Bassel Issa

is there a way to pass the culture - language for localization, so the login page load with specific language ?

Matt Raible

Hello Bassel,

This is a deprecated blog post that’s ancient in internet time. If you want to use react-native-app-auth in your React Native project, I’d suggest posting an issue in the react-native-app-auth GitHub repo with your question.

If you use the newer post (linked to at the top of this one) and use our React Native SDK, you’ll probably get the fastest response by entering an issue in the Okta React Native repo.