Sticky Cookie Across Navigation

Thank you for the great product.

I’m testing things out, it seems to borrow so may things from Postman, but even better with the UI/UX, and the DX is great.

I’m trying to wrap my head around how to get cookies sticky, working with Postman, when cookies are set from the server, it gets sticky across tabs, but this is not the case for ApiDog, upon navigation, the cookies are no longer available, I was wondering if there’s a workaround or a “how-to” for this use-case in the documentation anyone can point me to.

Thank you.

You can refer to this article for best practices on managing authentication state: Managing authentication state in Apidog - Apidog Docs

Thank you, I will look at the provided link.

Could you please share how you set it up that causes cookies to expire after switching tabs? We couldn’t reproduce this issue on our end. Would you mind providing some related screenshots?

I did not set anything up as of now, I’m running it barebones with my baseURL, I included a few documentation for my app authentication that uses cookies (about 5 different cookie), I shared my documentation with a friend to test out, but anytime they navigate from the login endpoint to other endpoints the cookie is gone.

Here are a few things you can check:

  1. After executing the login endpoint, verify if the cookies exist in the Cookies tab of the login response.
  2. Check if the cookies are stored in the Cookie (bottom-right of the app).
  3. When switching to another endpoint, ensure the domain matches, then inspect the request headers to confirm if the cookies are included.

Let us know your findings!

Oh I get it now, this assumes I’m developin right?

Like I rightly stated, I’m developing and testing locally with the desctop app, which works fine, but shared the published public URL with a friend to test, but the cookies are not persisted as they navigate (navigation causes reload).

In Apidog, cookies are only temporarily stored locally and are not synced across multiple devices. For your use case, we recommend setting up a login flow and extracting the cookies into an environment variable, then managing authentication through that variable.

@Eazy :nigeria: Could you please provide more details about your workflow? Specifically:

  1. How exactly are you saving the cookies?
  2. Where is your friend making requests from (browser/Apidog app/etc)?
  3. What’s the exact sequence when switching tabs/refreshing?
  4. What’s your expected behavior?

This will help us investigate the cookie persistence issue.

Currently, requests sent by the Apidog documentation site through Cloud Agent cannot automatically include cookies, which might be causing this issue. We will add support for this feature as soon as possible. For now, you can use the Browser Extensions as a CORS Proxy.

Thank you Vin