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

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

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

  • @anthonytang7346
    @anthonytang7346 4 дня назад +1

    Thank you

  • @vircheous
    @vircheous 16 часов назад +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  6 часов назад

      @@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 4 дня назад

      ​@@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  4 дня назад

      @@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.