PricingBlog

httponly

  • dublin_18748-1451186294427357297

    Dublin

    13 days ago

    How should I properly extract the token from my API response? My backend returns the authentication token, but I'm not sure what the correct formula path should be in the "Set HttpOnly cookie" Value parameter.

    Why is the Authorization header trying to get a cookie during the login request itself? Should this header be removed entirely from the login API configuration?

    What's the best practice for handling form submission with API calls in Nordcraft? Should I use the form's submit event or the button's click event?

    How can I conditionally set the cookie only when login is successful? Currently, the cookie action runs in onCompleted regardless of whether authentication succeeded or failed.

    Expected Behavior:
    User enters credentials and clicks Login
    API call is made to backend
    If successful, token is stored in HttpOnly cookie
    User is redirected to /gri-management
    If failed, user sees an error message
  • max.kayr-1451191788676317214

    Max

    13 days ago

    Hey! What is your backend? And where are you stuck when extracting the correct path? Screenshots are helpful 😊
  • dublin_18748-1451193054282252395

    Dublin

    13 days ago

    go backend
  • i am able to get the response back token and expiry
  • i am just lost with the onsuccess flows
  • where do i handle the redirect
  • we had a sessions flow
  • can you guys bring it back just for this project because this is tedious
  • why depricate it ?
  • andreasmoller-1451195047155335310

    Andreas Møller

    13 days ago

    We would love to help, but we don't have anything to go on. Share some screen shots of your setup, along with the problem you are trying to solve.
    💪1
  • max.kayr-1451196060864217128

    Max

    13 days ago

    I believe that the workflow has not changed. So I don't understand where you are struggling
  • dublin_18748-1451196123820720214

    Dublin

    13 days ago

    1451196117839646781-Screenshot_2025-12-18_at_12.02.50.png
    1451196119676620994-Screenshot_2025-12-18_at_12.53.36.png
    1451196123099435131-Screenshot_2025-12-18_at_12.54.58.png
    1451196120242978958-Screenshot_2025-12-18_at_12.54.00.png
    1451196117344583842-Screenshot_2025-12-18_at_12.02.19.png
    1451196116669436045-Screenshot_2025-12-18_at_11.59.41.png
    1451196120918396968-Screenshot_2025-12-18_at_12.54.19.png
    1451196118322118746-Screenshot_2025-12-18_at_12.51.44.png
    1451196122075762818-Screenshot_2025-12-18_at_12.54.39.png
  • Tod-1451196128577196033

    Tod

    13 days ago

    Great job @Dublin! Your contribution to the Nordcraft Community just made you advance to Community Level 2! 🌲
  • dublin_18748-1451196450552680500

    Dublin

    13 days ago

    1451196450297090113-Screenshot_2025-12-18_at_12.56.21.png
  • andreasmoller-1451204039189725375

    Andreas Møller

    13 days ago

    In this workflow you didn't set the value of the cookie
    1451204038933610608-Screenshot_2025-12-18_at_12.02.19.png
  • That should fix it
  • dublin_18748-1451213243946110996

    Dublin

    13 days ago

    The redirect happens but the the token isnt being received by the gri page because we are being redirected back to login
    1451213243744915506-Screenshot_2025-12-18_at_13.37.50.png
  • andreasmoller-1451214670173180079

    Andreas Møller

    13 days ago

    The API is giving you a login error.
  • dublin_18748-1451220544262373580

    Dublin

    13 days ago

    is there anyone I can jump on a call with
  • screenshare
  • dublin_18748-1451221115182776465

    Dublin

    13 days ago

    1451221115211874426-Screenshot_2025-12-18_at_14.34.25.png
  • 1451221330010837113-Screenshot_2025-12-18_at_14.35.17.png
  • dublin_18748-1451221784698294304

    Dublin

    13 days ago

    I am so confused why this isnt working as intended, api returning what it needs to and the page that its meant to be routing to is in the second screenshot.
  • dublin_18748-1451242550454128721

    Dublin

    13 days ago

    it works now thanks