Api Authentication With Laravel Passport | Forgot and Reset Password

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

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

  • @sadiqyusufilu7954
    @sadiqyusufilu7954 4 года назад +4

    Short, simple and very precise. Thank you.

  • @Jefferson4026
    @Jefferson4026 4 года назад +12

    Can you share the repository?

  • @damarpermadany9096
    @damarpermadany9096 2 года назад

    Very usefull video, thank u for sharing.

  • @desi_mundee
    @desi_mundee 4 года назад +1

    Ur channel is awesome me badly looking react js and laravel API authentication

  • @ScalableScripts
    @ScalableScripts  3 года назад

    If you want to authenticate using Laravel Sanctum you can check these tutorials:
    React and Laravel JWT Authentication: ruclips.net/p/PLlameCF3cMEuSQb-UCPDcUV_re5uXaOU9
    VueJS and Laravel JWT Authentication: ruclips.net/p/PLlameCF3cMEs7ErSWENv03zOKtH5NTG61
    Angular and Laravel JWT Authentication: ruclips.net/p/PLlameCF3cMEtVCB8awarHu1NjIyEX0Va9
    NextJS and Laravel JWT Authentication: ruclips.net/p/PLlameCF3cMEsbPs3bmm98UP3Ny8tqNs1f
    NuxtJS and Laravel JWT Authentication: ruclips.net/p/PLlameCF3cMEt0mlfWzGkk9_a5iV_xF-wr
    Svelte and Laravel JWT Authentication: ruclips.net/p/PLlameCF3cMEssaXOEym93ID7_e6ZDyiGO

  • @Somcoders
    @Somcoders 4 года назад +2

    Thank you , so I can migrate JWT to passport without hesitate.

  • @ItsAKAZ
    @ItsAKAZ 2 года назад

    Excellent Work!!!

  • @manuelcardona911
    @manuelcardona911 3 года назад

    Excelente explicación haces que sea muy sencillo de comprender, muchas gracias.

  • @antoniopapa7866
    @antoniopapa7866 4 года назад +1

    Nice video, thank you for sharing

  • @desi_mundee
    @desi_mundee 4 года назад +1

    Kindly make series on react js tutorial ur awesome teacher

    • @ScalableScripts
      @ScalableScripts  4 года назад +1

      yes more tutorials are coming on reactjs, but currently here you can find the react and laravel autherization: ruclips.net/video/F9Xmc3iHc88/видео.html

  • @nestorescala5595
    @nestorescala5595 4 года назад

    Nice video! Congratutations!! This help me so much.. Great!!

  • @A_C_3
    @A_C_3 3 года назад +1

    Where did you get the token when you test the 'reset' function in Postman?

  • @adhamkassem3058
    @adhamkassem3058 3 года назад +1

    Thank you for this great video

  • @rokybulrayhanchowdhury9923
    @rokybulrayhanchowdhury9923 4 года назад +2

    your are amazing , please share the repository it will help us

  • @chriscrowd4946
    @chriscrowd4946 3 года назад

    Excellent work! Thank you!

  • @oussamavive1
    @oussamavive1 4 года назад +1

    which IDE are you using and thank you for the greatest course !

  • @masivinmarquez2361
    @masivinmarquez2361 3 года назад +1

    Hi @scalable Scripts, I want to do a especial in order to register new users on front end but with admin user.. but since this api is public for anyone through postman.. this is not secure for my target right?, what is your suggestion to do that? thanks!

  • @masivinmarquez2361
    @masivinmarquez2361 3 года назад +2

    Hi @scalable Scripts, I am stuck on minute: 17:29, I am not getting the same result than you on Postman when I changed the param from 'Request' to 'RegisterRequest' on AuthController.. Also I noticed you have a file more named "../Requests/Register.php" , did you some other changes not visible on the video? please could you help me. thanks

    • @ScalableScripts
      @ScalableScripts  3 года назад +1

      You should add another header in postman X-Requested-With: XMLHttpRequest then your problem will be fixed

    • @masivinmarquez2361
      @masivinmarquez2361 3 года назад

      @@ScalableScripts oh yeah it worked. Jason is generated in Postman now :) thanks so much!!!

  • @alvaroperezdiaz3679
    @alvaroperezdiaz3679 4 года назад +2

    So... What are the advantages of using passport instead auth middleware?

    • @ScalableScripts
      @ScalableScripts  4 года назад +5

      Nice question, the regular auth middle ware uses sessions to store information about the authenticated users but passport stores them in the database. That's why when you install passport there are migrations that need to be run. Basically if you want to build RESTful API's you have to pick Passport since it handles also the JWT token and also it will prevent you from going to technical debt if your app goes bigger. I hope I clarified your question, let me know if you have more.

  • @subhadipghorui2216
    @subhadipghorui2216 3 года назад

    Can we create a refresh token with the access_token mannually??
    Please share the code.

  • @abusalahamusazangi6507
    @abusalahamusazangi6507 3 года назад

    Hi
    Could you please explain
    At 10:54
    Why did you use
    /** @var User $User */ in AuthController login method before the $user->createToken();
    Thanks in advanced

    • @ScalableScripts
      @ScalableScripts  3 года назад +1

      Because my IDE sometimes doesn't know that $user is a type of User so it define that in the comments and it will help the intellisense

  • @EdgarJRojasL
    @EdgarJRojasL 3 года назад

    Hi, when i'm trying to user login, i get "unauthorized" message...

  • @waguinhoramos
    @waguinhoramos 2 года назад

    can you provide the source code or repository?

  • @PavanKumar-wg3xr
    @PavanKumar-wg3xr 4 года назад

    can u please share me this file repository

  • @bassamdarawshi
    @bassamdarawshi 4 года назад

    why you don't validate the input before send the request ?

    • @ScalableScripts
      @ScalableScripts  4 года назад

      Is more secure to do it on the backend since the request can come from different sources like Postman for example.

  • @zekrialadin8801
    @zekrialadin8801 3 года назад

    git repo please ?

  • @sanjiseldarbe
    @sanjiseldarbe 4 года назад

    Thank you for this amazing course, im stuck at 11:23 .. I don't get token like yours. Codes are same. In my case i get something like:
    "token": {
    "name": "app",
    "abilities": [
    "*"
    ],
    "tokenable_id": 2,
    "tokenable_type": "App\\Models\\User",
    "updated_at": "2020-12-01T13:16:22.000000Z",
    "created_at": "2020-12-01T13:16:22.000000Z",
    "id": 25
    }
    How can i retrieve accessToken please help me teacher.

    • @sanjiseldarbe
      @sanjiseldarbe 4 года назад

      in AuthController's login() method i used response like this
      'token' => $token->token
      instead of
      'token' => $token
      then i get the token but not long as yours. After i tried to get the user, postman said "Unauthorized". I did exactly the same thing as you but still i can't get the user..

    • @ScalableScripts
      @ScalableScripts  4 года назад +1

      You are using Laravel Sanctum not Laravel Passport. You should use it like this $token = $user-> createToken('app')->plainTextToken;

    • @sanjiseldarbe
      @sanjiseldarbe 4 года назад

      @@ScalableScripts Oh ok i got the token but i am still "unauthorized". How should i use this token to authenticate? By the way i don't even know about Sanctum how can i remove that :( I'm so new at Laravel API please forgive me.. Thanks a lot for your quick answer.

    • @sanjiseldarbe
      @sanjiseldarbe 4 года назад +1

      in api.php i changed
      ->middleware('auth:api')
      to
      ->middleware('auth:sanctum');
      then i authenticated now i will continue with your course thanks again teacherr

  • @mohamdalmhde1322
    @mohamdalmhde1322 2 года назад

    reactjs local host 3000 lool

  • @toshi2205
    @toshi2205 2 года назад +1

    If anyone had the same troubles as me. (Probably its because I use Laravel 8)
    First problem: Can't run "php artisan serve"
    Make sure you are in your project folder: "cd laravel-api"
    2. Problem I had.
    Route::get('hello', 'HelloController@hello');
    Fix for me: Route::get('hello', 'App\Http\Controllers\HelloController@hello');
    factory(\App\User::class,10)->create();
    I had to replace with: \App\Models\User::factory()->count(10)->create();