Hi All,
We are developing an Android Native Offline app using SMP 3.0 SDK SP13 PL07 and SMP runtime SP11 PL04. We have our OData services implemented on an S/4 Hana system.
We are able to fetch the data and populate offline store successfully. But when we are trying to do transactions (creating / updating entities) and flushing/refreshing the offline store, we are getting 'CSRF token validation failed' error in one of ODataOfflineStoreRequestErrorListener's callback named 'offlineStoreRequestFailed'.
Also when testing in POSTMAN client, we are getting X-CSRF token when executing Get request by putting 'X-CSRF-Token:Fetch' in request headers. So the service is returning required X-CSRF token.
As per some other blog posts, in case of Offline store implementation we don't have to handle X-CSRF tokens explicitly. So we haven't tried to implement extra code for X-CSRF token handling in client side.
Below is screenshot of POSTMAN client where we have fetched X-CSRF token successfully:
1)
Below are the screen shots of configurations done on SMP server.
1)
2)
Kindly help us out here. Thanks in advance.
Kind Regards:
Shubham Kansal