cancel
Showing results for 
Search instead for 
Did you mean: 

HANA XSA: Calling one application from another application redirect to some /login/callback?code=

former_member651643
Participant
0 Kudos

Hi Experts,

I have created an application which have tiles on the click of tile i am calling another application but when i click on tile rather than going to the application it redirects to some https://hxehost:51280/productHarmoni/login/callback?code=77UsXKBI3L.

productHarmonization is the application where i want to redirect on the tile click.

My xs-app.json from the application which has tiles looks like this

{
  "welcomeFile": "webapp/index.html",
  "authenticationMethod": "route",
  "routes": [{
		"source": "(.*)(.xsjs)",
		"destination": "js_be",
		"csrfProtection": false,
		"authenticationType": "xsuaa"
	}, {
		"source": "(.*)(.xsodata)",
		"destination": "js_be",
		"authenticationType": "xsuaa"
	},  {
		"source": "productHarmonization/(.*)",
		"target": "/webapp/$1",
		"csrfProtection": false,
		"destination": "productHarmonization_fe_dest",
		"authenticationType": "xsuaa"
	}]
}

My mta.yaml configuration for app looks like this.(Full mta.YAML attached in attachments)

Code from View on tile click looks like this.

And code from web controller looks like this.

Full project structure

Can you please what should I correct so that on tile click application will reach to the right destination?

Dan_Antonio
Advisor
Advisor
0 Kudos

Is your initial FLP style application forcing the user to authenticate? Seems like if it is, then the forwardAuthToken should be passing it to the other applications in the same MTA/same UAA. If it is not forcing the authentication up front, then child/tile application is triggering the redirect as there is no token yet, and the redirect is breaking down somehow.

former_member651643
Participant
0 Kudos

Hi Dan,
Thanks a lot for replying, No my flp application not forcing user to login again, and i am using the UAA-service in all the applications, I am not sure why its going to login/callback, but if i run the application in the new tab and run it from flp tile click it works fine in flp application.

former_member651643
Participant
0 Kudos

Dan, Are you suggesting that I should remove "forwardAuthToken" from other applications other than flp so it will not redirect to login/callback url?

Dan_Antonio
Advisor
Advisor
0 Kudos

No, I'm saying that you may want to force the login on the FLP so that the login/callback is simplified and you only have to make sure it is working there. Once it is working on the FLP, then the forwardAuthToken should ensure that it gets passed to each application that is launched.

former_member651643
Participant
0 Kudos

Thanks Dan, But i have already applied the UAA-service to flp, And flp always ask to login when i open the application, The same UAA-service i have also applied for each applications as well, if i open each application individually they always aak to login first...but when i call them through my flp Application it generates this login/callback url. And if i open the Application first in another tab and than click on the tile for same Application from flp...it works fine for me.

Kindly suggest what i would do...i am totally clueless now

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Are you sure this is all running with the same UAA instance? In the HANA 2.0 SPS04 version of the Web IDE there was an enhancement so that when you run an application from the Web IDE it will also create any service instances. For the most part this is a nice feature but can cause your app to create a new UAA instance instead of using an existing one. If you are using a destination to a different application it isn't likely running with the same UAA instance because the run from the Web IDE is now creating its own UAA instance. Check from the cockpit to see what service instance things are actually bound to.

Accepted Solutions (0)

Answers (0)