Laravel Mobile Phone Verification: SMS with Vonage (ex Nexmo)

Поделиться
HTML-код
  • Опубликовано: 13 июн 2022
  • Laravel has an email verification feature at the registration, out-of-the-box, but what about mobile phone verification with SMS? Let's create this behavior, trying to stick to the same Laravel structure.
    Repository: github.com/LaravelDaily/Larav...
    Related links:
    - Interfaces and Traits: How to Use Them in Laravel Packages • Interfaces and Traits:...
    - Laravel SMS Notifications Docs: laravel.com/docs/9.x/notifica...
    - Laravel Notification Channels: laravel-notification-channels...
    - Laravel Email Verification Docs: laravel.com/docs/9.x/verifica...
    - Package mohammad-fouladgar/laravel-mobile-verification: github.com/mohammad-fouladgar...
    - - - - -
    Support the channel by checking out my products:
    - My Laravel courses membership: laraveldaily.teachable.com/p/...
    - Laravel QuickAdminPanel: bit.ly/quickadminpanel
    - Livewire Kit Components: livewirekit.com
    - - - - -
    Other places to follow:
    - My weekly Laravel newsletter: bit.ly/laravel-newsletter
    - My personal Twitter: / povilaskorop
  • ХоббиХобби

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

  • @Skynzor
    @Skynzor 2 года назад +7

    There is so much stuff I learned from you that I am using in our product, you're very good at showing your explanation. Great job!!

  • @johnbolt3187
    @johnbolt3187 2 года назад +24

    You are my Laravel sensei. Have learnt a lot from this channel. Concise and detailed. Amazing content. Keep it up bro🤝

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

      Totally agree.

  • @luiejohnmalimit
    @luiejohnmalimit 2 года назад +2

    I need this for our project. Thank you Povilas for creating such content!

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

    Been using nexmo a long time ago but your pattern is way more cleaner... Thank you for this

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

    You are a life saver I tried twilio it was working and suddenly stop and I was looking for alternative, thank you so much

  • @jekayode
    @jekayode 2 года назад +2

    Fantastic! Great content as always

  • @sowmik.reborn
    @sowmik.reborn 2 года назад

    I was waiting for this Video for a long time!

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

    Ha sido un buen tutorial, graciasss.

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

    this lesson save my day 👍🏻👍🏻

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

    Throttling would be smart to add. We had a problem with Sri Lankan users who spammed our forms to send sms to expensive phone numbers. Costed us hundreds of dollars before we managed to fix the problem.

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

      Can you explain this in detail please?

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

    Great video!

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

    Super!

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

    Awesome 👍

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

    i used TextLocal SMS for Otp provider the provide api and works fine.

  • @7mzacode272
    @7mzacode272 Год назад

    Thank you for this video. It works very well, but i have a problem with notifications, i don't receive any sms

  • @ShowcasewebdevelopmentCoUk
    @ShowcasewebdevelopmentCoUk 2 года назад +2

    @Povilas - thank you for all your videos. Have followed you for a few years now and learnt so much! QUESTION: I am wondering - is there any chance you can do a video on multi-level/complicated seeding? I know you've done a quick 5 minute one before a good while ago, but how would I seed the following? Customer->(hasMany)Orders->(hasMany)Leases->(HasOne)Car? It's almost as if it has 'nested relationship seeds' and it would be REALLY interesting to see how you would seed this? Would you create a master CustomerWithOrdersSeeder? OR would you programatically do it? Or would simply calling the Customer factory work?

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

      Good topic for the future. Adding to my to-do list, but currently I have around 3 weeks queue, so will publish something in July.

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

      @@LaravelDaily Really looking forward to it. Thank you

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

    thanks Sr i want to do exactly for my project API i just nedd the endpoin

  • @azzhraanee201128
    @azzhraanee201128 2 года назад +2

    Ok this is good as feature and well implemented.
    But!! now it's SMS messages which cost $, how about i generate a bot and make a huge amount of registering requests?, money gone.
    How to solve ?
    1- make sure the mobile number is unique among the verified numbers.
    2- saving the numbers temporary for example in the cache or DB with amount of tires and timestamp lets say for 10 minutes ahead.
    3- check before sending message if there is remaining tries for example 2 tries then send again, if no remaining tries show a message try again after 10 minutes.
    With these steps will help prevent bots and loosing SMS $$.
    If there is a temporary mobile phone service (thats the service provider responisbilty to validate the bot numbers), to overcome that validate both email as the first step and after email is verified then validate the mobile number.

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

    Vonage is very expensive. Any alternative please

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

    Hello @Laravel Dail, Please can you walk me through laravel sms notification after a user is registered, it shouldn't be verify notification, just an sms to a users with random code for each users after registration.. Thank you

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

    Just want to sharing
    We have bad experience, a hacker using bot and they always using random phone number and can get otp (using vonage).
    Not sure how they get so many phone number and can access otp.
    Not sure if vonage has validate phone number too.
    Thats crazy

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

    Hello sir.
    Thank you for this video.
    I have an issue regarding the case when the user ignores the phone verification process?
    In this case user has been created in database but not verified yet and that will be a problem since user can't register again with that phone number. clearly we can ask user to login in this case but in my project, I want to have the same route for login and register and when the user's phone is verified, his account will be created and if the phone is not verified his account will not be created. And if the user is trying to login, after entering verification code, he will be able to login to his account.

  • @ivannicolas2573
    @ivannicolas2573 5 месяцев назад

    can I ask. I'm new to laravel and the moment you registered, the mobile_verfied_at, mobile_verify_code, etc are null or they are filled? In my case they are null after registering and it is requesting for the OTP

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

    can you give me a way to do that

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

    This is nice, but a 6 numeric code isn't very difficult to guess with a few tries, unlike a token. It would be nice if there was a maximum number of attempts or an expiration time to guess the code

    • @LaravelDaily
      @LaravelDaily  2 года назад +5

      Sure, good idea, you can add that!

    • @MaxRomagnoli
      @MaxRomagnoli 2 года назад +2

      @@LaravelDaily I made a pull request (not tested yet because i'm too lazy to set up Vonage)

    • @ricardomonteiro2523
      @ricardomonteiro2523 7 месяцев назад +1

      6 digits is just shy of 1 million possibilities. Unless you're actively trying to bruteforce your way in, you're not getting in.

    • @MaxRomagnoli
      @MaxRomagnoli 7 месяцев назад

      @@ricardomonteiro2523 That's exactly why I thought so. However, my request has already been submitted

  • @markmj8854
    @markmj8854 9 месяцев назад

    do you have db for this code?❤

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

    Hello, I want to buy a Yearly Membership, but the price with taxes is very pricey ($149.64) for me in Mexico(+ $18.58), is there a chance to get a cupon?

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

      All coupons for different countries are here: coupons.laraveldaily.com

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

    Could you create video with whatsapp verification?

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

      I don't use Whatsapp so can't really show it.

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

    When I enter my number everything works as it should and I get verification code, but when I enter my friend's number it doesn't get any verification code. Can you explain?

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

      I believe there is a restriction with the free credit that limits SMS sending to registered numbers exclusively.

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

    can we get a video in laravel soketi?

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

      codecourse has course on it

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

      Yes, specifically this: twitter.com/teamcodecourse/status/1534467546187014144

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

    Can this be added together with email verification?

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

    Not sure I may be wrong but saving verification code without hashing is not good.

    • @LaravelDaily
      @LaravelDaily  2 года назад +6

      Verification code is not password. Probably a better security measure would be to limit the time of using the code, adding expiration time.

    • @saurabhshukla2605
      @saurabhshukla2605 2 года назад +2

      @@LaravelDaily yes adding expiring time increases the chance of security but saving it as it is increases the chance of reading it from db for the user/admin who has access the db. The reason for hashing is even the system don't know the code generated and it is validated by comparing hashes of both. I may be wrong, but I think this will be good.

    • @luiejohnmalimit
      @luiejohnmalimit 2 года назад +2

      @@saurabhshukla2605 I agree with it, I implemented a non-standard methods but hashed the otp value. I think this is more secure.

    • @paulnaija
      @paulnaija 2 года назад +2

      OTP is a one time thing and then it's useless.. the expiration time is better, hashing it is fine but not really necessary because after expiration time elapses, used or not, hashed or not the overall token becomes useless...

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

      @@paulnaija Yes agreed, but it is essential because it verifies whether the user is a genuine user.

  • @NoName-oh9fh
    @NoName-oh9fh 2 года назад

    Чел хорош уже игнорить, мы тебя раскусили, ты русский.

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

      откуда инфа? ) Ну даже если так - лучше не деанонить в текущей ситуации