Debugging Laravel Sanctum 401 response

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024

Комментарии • 12

  • @transcrobesproject3625
    @transcrobesproject3625 6 месяцев назад

    You have no idea how much of a legend you are! I was like "here we go again, another dead end that doesn't fix my issue..." but you were spot on! I'm doing funky multi-sites being accessed from a single domain in multiple kubernetes containers and laravel was not liking the domain. Nice!

  • @bigsgm
    @bigsgm 2 месяца назад +1

    thank you so much!!!

  • @KwesiBoatengOwusu
    @KwesiBoatengOwusu 2 месяца назад

    Thank you soo soo much

  • @holakonoob
    @holakonoob Год назад

    Hey Cdruc, I know you're working on a Sanctum authentication course. If you could create a RUclips playlist explaining the basics of Sanctum and how to use it for authenticating a SPA on different domains with a Laravel API, that would be really helpful

  • @MrFixIt-le7rs
    @MrFixIt-le7rs 11 месяцев назад

    Hi, do you have a paid for nuxt and laravel API of extensive project like this one you are show casing? I'm wiling to buy. I need to learn this best practices

  • @adamshaibu3911
    @adamshaibu3911 8 месяцев назад

    @cdruc i have tried all possible configs, "/user" returns 401. The logs look ok. I dont know what to do next

  • @francismori7
    @francismori7 Год назад

    In sanctum.php, it looks like the FRONTEND_URL is supposed to be included in the stateful domains array..?

    • @francismori7
      @francismori7 Год назад

      Oh, but it uses parse_url and PHP_URL_HOST which excludes the port. This feels like maybe this should be PR'd.

  • @rokix101
    @rokix101 8 месяцев назад

    after all this still cant get my project to view a protected route... its been months , all values seem correct but stilll get 401 unauth

    • @cdruc
      @cdruc  8 месяцев назад

      have you tried logging out the domain and sanctum stateful domains list? what do you get in your log file. i see absolutely no reason other than a mismatch there.

    • @rokix101
      @rokix101 8 месяцев назад +1

      @@cdruc i've tried doing so but no file gets generated, almost like that function never gets called, also i have a weird 3rd cookie with a random name. Also after login, the cookies get updated with a new value 1 or 2 times? why is that?