PricingBlog

Cant use http-only-cookies on editor

  • fe_rojas-1476568707021930568

    FeRojas

    15 days ago

    Im having trouble using the http-only-cookies on the editor, is something that always has work well using Nordcraft extension, but since some weeks the extension stop working for me. Authentication flows work well on production and on preview pages, is just in the editor that the extension is not getting the cookies. I can see cookies in the browser DevTools Application tab under Cookies https://editor.nordcraft.com/ for both cookies (with domain of preview pages)

    Could someone guide me through the most common things to check when troubleshooting?
  • erikbeus-1476846040152936608

    Erik Beuschau

    14 days ago

    Are you using the Chrome or Firefox extension?
  • fe_rojas-1476928688321859668

    FeRojas

    14 days ago

    Hi!
    Im using the chrome extension on brave (Chrome based), but also install it to Edge Browser and in Chrome, both with same results. The strange things it is something worked well for me all this time (some weeks ago).

    Btw maybe would be usefull to add an option in the "Cookies" tab to manually add cookies by getting it from the DevTools/Application as an fallback option. For now, I do something similar to live test api calls in the editor: I hard code the access_token in the header api cal, but I have to manually reverse to a formula using http-only-cookie after tests.
  • erikbeus-1476929795878289448

    Erik Beuschau

    14 days ago

    Alright. I see. We did change the preview url a while ago from *.toddle.site to *.nordcraft.site, but the editor extension should have been updated to support that. I'll debug in a project of mine to verify and get back to you 👍
  • fe_rojas-1476929893106188491

    FeRojas

    14 days ago

    👍 👍
  • erikbeus-1476936349184688232

    Erik Beuschau

    14 days ago

    Could you try logging into [this project](https://editor.nordcraft.com/projects/erik_auth/branches/main/components/LoginPage?mode=design&rightpanel=style&canvas-width=800&canvas-height=800&leftpanel=Cookies) in the editor and see if the session works? After logging in in test mode, you should see the session. And if you navigate to a different page in the editor and back to the login page in the editor, the session should still be there. At least it seems to work for me 🤷‍♂️

    Credentials:
    erik+auth2@toddle.dev
    1234512345
    1476936349398470808-CleanShot_2026-02-27_at_14.35.51.png
  • fe_rojas-1476944120051142716

    FeRojas

    14 days ago

    Yes, it does work 👍
    1476944119799611515-image.png
  • fe_rojas-1476944866159231112

    FeRojas

    14 days ago

    I notice there is a difference in the domain from the one your project generated and the one my project generated; yours have subdomain and ends with .site
    1476944865949650954-image.png
  • (Second cookie is capture by the extension and first is not)
  • erikbeus-1476946794775842898

    Erik Beuschau

    14 days ago

    What does the cookies look like in your project?
  • fe_rojas-1476947298960408758

    FeRojas

    14 days ago

    What do you mean? This is the cookie that my project generated on sign in.
    1476947298696036546-image.png
  • fe_rojas-1476947677907259494

    FeRojas

    14 days ago

    Sorry... wait
  • fe_rojas-1476948097136459927

    FeRojas

    14 days ago

    My bad. Ignore comments of different domain (that was from live site). This is the cookie when login on preview site.
    1476948096834601012-image.png
  • fe_rojas-1476948704283070665

    FeRojas

    14 days ago

    My project cookie-domain -> .dev-humanli_convex.toddle.site
    Your project cookie-domain -> .erik_auth.nordcraft.site
  • Tod-1476948705260081325

    Tod

    14 days ago

    Great job @FeRojas! Your contribution to the Nordcraft Community just made you advance to Community Level 8! 🌲
  • fe_rojas-1476949789475344620

    FeRojas

    14 days ago

    So there is a difference in cookie domain generated from preview pages login in your project vs my project
  • erikbeus-1476949938830315521

    Erik Beuschau

    14 days ago

    The .dev- prefix is just because you were logging in on a preview branch for your dev branch. The link I sent you was to the main branch of my project
  • The main branch of a project doesn't have a prefix before the project id in the url
  • fe_rojas-1476950189687181312

    FeRojas

    14 days ago

    I wasnt referring to the prefix but to the domain -> .nordcraft.site vs .toddle.site
  • erikbeus-1476951021807865928

    Erik Beuschau

    14 days ago

    Oh, sorry. I didn't notice that.
    Right, so as mentioned we changed from using toddle.site to nordcraft.site for our preview domains. Are you still visiting your toddle.site domain when visiting your branch preview url? If so, that would explain why it doesn't work. I suggest you:
    - Delete any *.toddle.site cookies in your browser
    - Click the preview button in the editor to visit dev-humanli_convex.nordcraft.site
    - Authenticate (either in preview or from within the editor's preview)
    - Verify if things work
  • Oh, and if we still link to the *.toddle.site domain from somewhere, please let me know where that link is so we can fix that 🙏
  • fe_rojas-1476951442404147431

    FeRojas

    14 days ago

    Yes, Im still visiting the toddle.site domain when visiting my branch preview url. Ok I'll do the tests! 👍
  • erikbeus-1476952367021948950

    Erik Beuschau

    14 days ago

    Alright. That would be the issue then. Sorry if we haven't made it clear how to debug/test going forward.
  • fe_rojas-1476952700666118299

    FeRojas

    14 days ago

    Yes that was the issue. Fixed now 🙂
    1476952700381036718-image.png
    🙌1
  • But the problem wasnt in the editor or cookies
  • erikbeus-1476953174953824397

    Erik Beuschau

    14 days ago

    Did you hardcode the domain perhaps?
  • fe_rojas-1476953175834759189

    FeRojas

    14 days ago

    Was in the domain in my backend that is use to redirect to callback page
  • erikbeus-1476953219157459015

    Erik Beuschau

    14 days ago

    Ah I see
  • That makes sense. Glad you figured it out 👍
  • fe_rojas-1476953278494540051

    FeRojas

    14 days ago

    Is an Environment Variable in Convex
    👍1
  • Thanks for the help!
  • erikbeus-1476953571336654964

    Erik Beuschau

    14 days ago

    You're welcome 🙌