#02 Create Post CRUD using Laravel API Resource | Hadayat Niazi

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

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

  • @asfiaaiman3699
    @asfiaaiman3699 Месяц назад

    Much needed tutorial 👌👌

  • @muhammadnaveed7953
    @muhammadnaveed7953 Месяц назад

    Thank you sir g

  • @AbdulHaseeb-ot9zg
    @AbdulHaseeb-ot9zg Месяц назад

    bro what is the best way to auth the api endpoints
    client id and secret in header or the token that gets expired everyday and then use the new one
    give me answer with example most of the people told me it depends but what exactly depends

    • @hadayatniazi
      @hadayatniazi  Месяц назад

      First you need to understand there are two types of token. Access token and refresh token. Access token expire after an hour and than you can regenerate your access token using refresh token

    • @AbdulHaseeb-ot9zg
      @AbdulHaseeb-ot9zg Месяц назад +1

      @@hadayatniazi yes i am referring to access token from sanctum
      now tell me if i do auth using sanctum token and somebody claims that this approach should be replaced with client id and secret so what should my response to that

    • @hadayatniazi
      @hadayatniazi  Месяц назад +1

      Sanctum is simple and light weight package which provide us authentication. You can say that sanctum is used for straightforward authentication, but if you need more advance security then go with client secret, key approach, it's complex but provide higher security.