cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication Issue in mobile services client

0 Kudos

Hi All,

The mobile services of our MDK application uses a CAP based nodejs service deployed in cloud foundry. This service uses UAA for authentication & authorization. When the mobile application developed in MDK is accessed in Mobile client, it provides the login page and after authentication, the data shows correctly.

But the second time we access the app, it throws the following error in mobile services:

The following is the SSO option enabled:

We have tried with both the above checkbox selected as well as not selected, but the result is same.

In the mobile app, we are getting the below errors depending on whether the above checkbox is selected or not:

Can you please tell us where we are going wrong.

Thanks,

'Harish

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Harish,

What security type are you using in Mobile Services for the CAP endpoint?

Bill

0 Kudos

Hi bill.froelich ,

The security type used is forward authentication and tested with the checkbox "Forward User Token to App router" selected as well as not selected.

I have updated the original question with more details. Please check it as well.

Thanks,

Harish

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

For some reason when I looked at the question the first time only the one image showed. Sorry for the redundant question.

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi there,

Did you fix this issue? We are facing a similar problem of accessing another BTP Service from within a mobile App in the BTP Mobile Services. Could you please share your solution?

Thank you,

Nithya

0 Kudos

Hi Harish,

It might just be easier if we had a quick chat and then you can document the solution for others that stumble upon this answer. Why dont you send me an email and we can set up a call?

Regards,

Prakalp.

[EDIT]

A Colleague also wrote this step by step guide. Perhaps that may be of immediate help.

How to configure SSO Mechanism in Mobile Connectivity Ⅰ | SAP Blogs

former_member718692
Discoverer
0 Kudos

Thanks Prakalp. I will mail you.

Regards,

Harish

0 Kudos

Hi Harish,

For a different (but similar) case, what we did was to use OAuth2 User Token Exchange as the SSO mechanism (in the connectivity settings of your app) and harvest the credentials from the Service Binding plus the standard endpoints from the Security tab.

Have you tried this option? If not, could you invest a few minutes to check if this option works for you.

Regards,

Prakalp.

0 Kudos

Hi Prakalp ,

I tried your approach, but I am getting the following error:

Error when processing OAuth2 User Token Exchange SSO: [Message: 403 Forbidden: [{"error":"Invalid CSRF Token 'null' was found on the request parameter 'X-Uaa-Csrf' or header 'X-CSRF-TOKEN'."}]]

I had created a service key in UAA and used the clientid, client secret & url from the key:

Moreover in security, I selected as below:

Is this how it should be done?

Thanks,

Harish