Question / Problem
I'm calling an external API that uses cookie-based session authentication via kintone.proxy(). The login endpoint responds with a Set-Cookie header, but the cookie never seems to actually get stored in the browser. Because of this, my follow-up requests have no session cookie and the my server treats me as unauthenticated.
Current Situation
Kintone App has a JS customization on the Record Edit screen - I'm calling an external API that logs in a user to our server, and then does some authenticated calls.
The API works fine when tested in Postman
Code / Attempts
// Step 1: Login β expecting Set-Cookie in the response
kintone.proxy('https://api.example.com/login', 'POST', {'Content-Type': 'application/json'}, { username: 'user', password: 'pass' }).then(function(resp) { console.log(resp[2]);
// Step 2: Authenticated call β cookie is never sent
kintone.proxy('https://api.example.com/data', 'GET', {}, {}).then(function(resp) { console.log(resp[0]); // returns 401 Unauthorized });
Error Message
none just no cookie.
Desired Outcome / Expected Behavior
Is there a way to to specify to pass along the cookie?