Instant Facebook Login Setup in Laravel 11 with Socialite | Login with Facebook

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 18

  • @anthonytang7346
    @anthonytang7346 6 วันที่ผ่านมา +1

    Thank you

  • @vircheous
    @vircheous 2 วันที่ผ่านมา +1

    It's probably better to check for both the email and provider_id in the db before registering. Checking only the ID might not be safe.

    • @programmingfields
      @programmingfields  วันที่ผ่านมา

      @@vircheous Yes, we can add that check as well. That's only for the demo purposes.

  • @angelukpong
    @angelukpong หลายเดือนก่อน +1

    I will plead you to also do videos on Alpinejs and Tailwind CSS. Thanks for your great help.

    • @programmingfields
      @programmingfields  หลายเดือนก่อน +1

      @angelukpong Thank you very much for your suggestion. I will start a new playlist very soon. Please be patient.

  • @angelukpong
    @angelukpong หลายเดือนก่อน +1

    What if a particular user (John Doe)wants to be funny by registering with different social media accounts like using both Facebook and Google thereby having 2 accounts. how will you handle it and ensure the user (John Doe)is not a multiple users.

    • @programmingfields
      @programmingfields  หลายเดือนก่อน +1

      @angelukpong In order to handle with this scenario, you will have to consider for both social media accounts there should be the same Email Address because through the name only, we can consider unique user (John Doe) whether this is registered by Facebook and Google.
      Also, while proceeding with the social login, you will have to check by email address field instead of provider unique id. If that email exists (no matter if it is registered using Google or Facebook) you will have to consider that user exists then simply make it auth login.

  • @gurmeetsingh-by1in
    @gurmeetsingh-by1in หลายเดือนก่อน +1

    When i hit cancel i get error why

    • @programmingfields
      @programmingfields  หลายเดือนก่อน

      @gurmeetsingh-by1in what kind of error you are getting?

    • @tripham7136
      @tripham7136 5 วันที่ผ่านมา

      ​@@programmingfields i login with facebook just like you do and my database have the info for that user then i delete that user data in my database then run again login with facebook with that user i click continue and i got the error that i cant get email from that user it return null for field email,what should i do to fix this error

    • @programmingfields
      @programmingfields  5 วันที่ผ่านมา

      @@tripham7136 The issue you're facing happens because Facebook may not give the email if:
      1. You have removed your app's permission to access the email.
      2. Your app didn't ask for permission to access the email.
      3. The email was previously retrieved and then removed from your database, so Facebook doesn't send it again.
      To fix this, make sure your app is asking Facebook for the email permission when the user logs in. If that permission is missing or revoked, Facebook won't give you the email.