Hot to allow to store cookies retrieved through REST api

I have a situation where an REST Api provides token/authentication cookie with Http response message, which is to be stored in the InAppbrowser. The inAppbrowser doesn’t store the cookies please provide solution.