# Build a Mobile App with React Native and Spring Boot

**URL:** <https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943>\
**Category:** Developer Blog Comments\
**Created:** [October 10, 2018, 3:50pm UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943 "2018-10-10T15:50:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [October 10, 2018, 3:50pm UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/1 "2018-10-10T15:50:20Z")

</div>

[Build a Mobile App with React Native and Spring Boot](https://developer.okta.com/blog/2018/10/10/react-native-spring-boot-mobile-app)

In this tutorial, you’ll learn how to build a Spring Boot API and a React Native app. You’ll also see how to deploy the API to Cloud Foundry and Google Kubernetes Engine.

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [July 19, 2019, 12:28am UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/2 "2019-07-19T00:28:17Z")

</div>

**Edem Morny**

Hi. Thanks very much for this blog. It’s been very helpful.

I’m able to configure Okta with my react-native app to authenticate via PKCE. However, I experience 2 problems when testing in Android  
1. After entering my username and password on the Okta login screen, i’m stuck on that screen and it doesn’t navigate back to the screen that invoked the login process. I’ve checked my `redirectUrl` and it seems correct. I end up closing the okta login screen, refreshing my app in dev mode and then seeing the token take effect. What else can i do?  
2. More importantly, the whenever i use the accessToken i obtained to make a REST call to my Spring Boot application, i get a 401- Invalid Token message. I have no idea what to do with this one.

Will be very glad for your help as i’m stuck now and don’t know how to move forward. My app is generated with JHipster 6.1.2 and the mobile is generate with your Ignite CLI 2.2.2 and Ignite JHipster 2.0.3

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [July 30, 2019, 4:07am UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/3 "2019-07-30T04:07:28Z")

</div>

**Matt Raible**

Hello Edem,

I think you might need to use a newer version of Ignite JHipster for JHipster 6. The latest release is v3.1.5. It looks like OAuth 2.0 login was fixed in [3.1.2](https://github.com/ruddell/ignite-jhipster/releases/tag/v3.1.2 "https://github.com/ruddell/ignite-jhipster/releases/tag/v3.1.2"). Please let me know if this helps. If it does not, I’d recommend trying this tutorial again with the versions it uses.

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [November 12, 2019, 2:01am UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/4 "2019-11-12T02:01:56Z")

</div>

**Shahzad Munir**

I am facing this issue, can you please help me resolve this. I need an urgent resolution of this issue to meet a close deadline  
[https://stackoverflow.com/q…](https://stackoverflow.com/questions/58806177/pod-install-fail-on-command-cmd-cd-ios-pod-install-cd "https://stackoverflow.com/questions/58806177/pod-install-fail-on-command-cmd-cd-ios-pod-install-cd")

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [March 20, 2020, 3:45am UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/5 "2020-03-20T03:45:01Z")

</div>

**Kishore Kunapareddy**

When deploying to okta the below change has to be done, otherwise service will throw errors as per [https://www.jhipster.tech/s…](https://www.jhipster.tech/security/ "https://www.jhipster.tech/security/")

Modify src/main/resources/config/application.yml to use your Okta settings. Hint: replace {yourOktaDomain} with your org’s name (e.g., [dev-123456.okta.com](http://dev-123456.okta.com "dev-123456.okta.com")).

security:  
 oauth2:  
 client:  
 provider:  
 oidc:  
 issuer-uri: https://{yourOktaDomain}/oauth2/default  
 registration:  
 oidc:  
 client-id: {client-id}  
 client-secret: {client-secret}

One more thing specify [http://localhost:8080/login/oauth2/code/oidc](http://localhost:8080/login/oauth2/code/oidc) as a Login redirect URI, then only it will work.

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [March 23, 2020, 6:19am UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/6 "2020-03-23T06:19:09Z")

</div>

**Matt Raible**

Thanks for the tips @disqus\_0d0SteHbxa! These steps are only necessary if you omit the version numbers for JHipster and Ignite JHipster when doing this tutorial. You are correct in that they won’t work for JHipster 6. That’s why I specify the version numbers in all the install commands. 🙂

---

<div class="post-metadata">

**Author:** ![oktadev-blog](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/oktadev-blog/32/3422_2.png) [@oktadev-blog](https://devforum.okta.com/u/oktadev-blog)\
**Post date:** [March 23, 2020, 3:06pm UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/7 "2020-03-23T15:06:26Z")

</div>

**Kishore Kunapareddy**

That is right :), I have omitted version numbers and faced these issues, thanks for pointing it out :).

Thank you very much for such a wonderful post.

---

<div class="post-metadata">

**Author:** ![reactivedev](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@reactivedev](https://devforum.okta.com/u/reactivedev)\
**Post date:** [August 25, 2023, 6:45am UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/8 "2023-08-25T06:45:21Z")

</div>

Hi Matt,

Thank you for the wonderful article, I have been trying to follow this for days but most of the stuff here has changed. I have been using JHipster 7.9.3.

Everything worked great on the API side but I have been having hard time using ignite.

Looks like ignite was replaced by generator-jhipster-react-native, so I used the command jhipster --blueprints react-native. I used both options by specifying API locatgion and also by using jdl, it doesn’t look like it is generating the two Auth files you mentioned in your article. I ran into the error “Error fetching auth info from backend” when using Expo web option. I don’t understand the role that Expo plays here, I created expo profile, created an app and initialized it after generating react-native app, still ran into the same issue on the web, also I tried using android App where I ran into “Error: The system cannot find the path specified”.

I am data engineer so my app development skills are not that great, I think I ran into a deadend, could you please update this article?

---

<div class="post-metadata">

**Author:** ![mraible](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mraible/32/37_2.png) [@mraible](https://devforum.okta.com/u/mraible)\
**Post date:** [August 28, 2023, 9:01pm UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/9 "2023-08-28T21:01:43Z")

</div>

Hello!

I wrote a newer tutorial last year that uses a more recent version of React Native JHipster.

> **[Integrate React Native and Spring Boot Securely](https://auth0.com/blog/integrate-react-native-and-spring-boot-securely/)**
>
> Use JHipster to build a photo-sharing app for web and mobile that has a React front-end with OIDC authentication and a Spring Boot back-e...

Does this help?

NOTE: I also [released version 4.4.0 of the blueprint](https://github.com/jhipster/generator-jhipster-react-native/releases) a couple of weeks ago.

---

<div class="post-metadata">

**Author:** ![sofiya85](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/sofiya85/32/5198_2.png) [@sofiya85](https://devforum.okta.com/u/sofiya85)\
**Post date:** [January 19, 2024, 10:20am UTC](https://devforum.okta.com/t/build-a-mobile-app-with-react-native-and-spring-boot/16943/11 "2024-01-19T10:20:36Z")

</div>

I appreciate your efforts. I recommended to my brother that he connect to you because he is very interested in the Spring Book API.
