PricingBlog

Access token not accessible in editor

  • switchman8850-1277464948653690931

    switchman8850

    1 year ago

    I have a login component that works perfectly, resulting in a cookie set for my access token.

    I then have another component that calls an auth/me endpoint upon a button click. This is an authenticated endpoint, and thus the access token gets sent. This should, ideally, return the user information.

    I want to use the returned id of the user in something, but I am unable to reference it in a formula as for some reason I don't get an access token when using the editor (which makes it impossible to reference a result from the api call in a formula). If I go into preview, I can login, get the access token, and the auth/me endpoint works. But this does not happen in the editor, and the problem with this is that I need to get data returned from the auth/me call in order to be able to reference a specific field from it in a formula. Any ideas on how to fix?
  • lucasg-1277468665662537759

    Lucas G

    1 year ago

    Step by step on this one. Do you have the toddle extension installed?
  • switchman8850-1277482214707429429

    switchman8850

    1 year ago

    Yes!
  • max.kayr-1277492603088015372

    Max

    1 year ago

    Did you login in the preview mode (= new tab) and refresh your editor afterwards?
  • anish99-1277506389979168902

    Anish

    1 year ago

  • Tod-1277546999788339302

    Tod

    1 year ago

    Great energy @needtheanswers! Your continuous contribution to the toddle Community just made you advance to Community Level 4!
  • needtheanswers-1277552389703991336

    needtheanswers

    1 year ago

    I had the exact same issue but after a few times of going back and forth (+ refreshing the page) it worked.
  • switchman8850-1277822913202098241

    switchman8850

    1 year ago

    @Max I did, but it didn't work. Here is a recording
  • Tod-1277822916259610726

    Tod

    1 year ago

    Great energy @! Your continuous contribution to the toddle Community just made you advance to Community Level 2!