cancel
Showing results for 
Search instead for 
Did you mean: 

Node JS and UI5 Integration - Error (401 - UnAuthorized)

mails2dhk15
Explorer
0 Kudos

Hello Experts,

I have created a Node JS Service and deployed in Cloud Foundry, i have also created a UI5 Application with Managed AppRouter,

When calling Node JS Endpoint from UI5 Application, i am getting Error (401 - UnAuthorized).

When accessing Node JS application directly via App Router, user is redirected to login screen and after successful login, NodeJS Endpoint can be accessed.

I have created a Destination (OAuth2UserTokenExchange), to access Node JS Endpoint in UI5 Application. Can you please, tell me, where am i going wrong.

Thanks

DHK

ajax-call-to-access-nodejs-endpoint.png

nodejs-code.png

nodejs-manifest-yaml.png

nodejs-xs-app-json.png

ui5-app-xs-app-json.png

ui5-app-mta-yaml.txt

mails2dhk15
Explorer
0 Kudos

In BTP Destination (node-destination-my-home), I have taken Client ID, Client Secret and Token Service URL from myhome-nodejs-xsuaa-service (which is created for Node JS Application)

Token Service URL : https://abcd-xyz.authentication.us10.hana.ondemand.com/oauth/token

Have taken Client ID and Client Secret from Right Place ?

View Entire Topic
ramonlee5
Explorer
0 Kudos

I solved it with the below destination type.