Hybrid App using Spring Social displays Whitelabel Error Page

I developed a hybrid mobile app using the ionic framework (AngularJS, Apache Cordova, Nodejs, etc). When I deploy or run the hybrid app in a mobile device (android or iOS) via ionic view and I do Facebook aggregation, everything works on the backend but the app (front-end) does not send referer attribute in the HTTP Header.

The front-end after successfully doing Facebook Login and getting OAuth2 toke displays a white page that says: Whitelable Error Page This application has no explicit mapping for /error, so you are receiving this as a fall back.

There is some security around that, not sure what yet, but that is the reason the Facebook Spring Social code in my backend (a java .jar file running on Spring Boot) does not redirect back to AngularJS API in mobile device (front end) is failing.

I was reading here https://spring.io/guides/tutorials/spring-boot-oauth2/ but this is for a Web App using Spring Social. I am using Spring Social in a hybrid app. Any idea on how I can resolved this issue? To make the referer attribute dynamic and to be send in the HTTP Header?