Auth0 Authentication with React (Login / Logout with Auth0)

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ม.ค. 2025

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

  • @gizmo_stuff
    @gizmo_stuff 2 ปีที่แล้ว +1

    Fabulous Amazing I wanna see you get 10k *claps of appreciation*

  • @asmapatel6127
    @asmapatel6127 2 ปีที่แล้ว

    hello, I keep on getting error
    Error: You forgot to wrap your component in .
    Source
    src/LogInButton.js (6:34) @ onClick
    4 | const { loginWithRedirect } = useAuth0();
    5 |
    > 6 | return loginWithRedirect()}>Log In
    | ^
    please tell me how to resolve?

  • @28_rigvedraut66
    @28_rigvedraut66 ปีที่แล้ว

    hey i want to redirect to dashboard.js what to do

  • @AlirezaFirouzyar
    @AlirezaFirouzyar ปีที่แล้ว

    Hi just have one question, in staging and production env after logout it will redirect to localhost:3000 how can I fix this?

  • @ChristopherBobby
    @ChristopherBobby ปีที่แล้ว

    I cant seem to have gotten the user though, auth token always return 401

  • @pytronicdesign
    @pytronicdesign ปีที่แล้ว

    Hi my friend. Do you know how i can change language?

  • @gauravpandey2871
    @gauravpandey2871 ปีที่แล้ว

    How to create custom signup page and use auth0 for authentication not want to use universal auth0 signup

  • @njw_cs
    @njw_cs 2 ปีที่แล้ว

    how can we remove those contents after welcome

  • @digiartpassion8513
    @digiartpassion8513 2 ปีที่แล้ว

    Great article...just one quesion how can i not show login button once i am logged in and the vice versa and also add my profile pic once logged in ?

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      This is late. But the basic flow is this.
      When loggedIn event gets called (I forget the exact event name), you can then hide the button by wrapping your button in a div like this:
      You can then make a function like this to then show the div or not show the div.
      function toggleElement() {
      var x = document.getElementById("loginButton");
      if (x.style.display === "none") {
      x.style.display = "block";
      } else {
      x.style.display = "none";
      }
      }
      Basic Flow:
      When log in event happens: Hide login, show logout.
      When log out event happens: Hide logout, show login.
      This is vague, but hopefully helpful!

    • @digiartpassion8513
      @digiartpassion8513 2 ปีที่แล้ว

      @@CooperCodes Thanks for your reply !! anyway i am not comfortable with auth0...so i decided to go with jwt token

  • @thoribonner195
    @thoribonner195 2 ปีที่แล้ว

    thank you so much for this!

  • @Victor-wh9bs
    @Victor-wh9bs 2 ปีที่แล้ว +1

    Great 🔥

  • @SuperSleepStealer
    @SuperSleepStealer 2 ปีที่แล้ว

    Hey!!! Thank you so much for this great tutorial.
    Super helpful to understand.
    However, would you mind to share a github’s or any other repository’s link where this code might be at? That would be awesome!!!!!
    Thanks so much again!! 😄

  • @NinaTheLudaca
    @NinaTheLudaca 2 ปีที่แล้ว

    Hi there! After logging out and then trying to log in again and choosing to continue with Google, it doesn't prompt me to choose an account I wanna sign in with - it remembers the account I used the last time. Any idea how to fix this because I really want to be able to switch accounts easily.

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      Possibly look into clearing the cache manually? That is strange though. I would bet it has something to do with Google caching your previous login.

  • @SonAyoD
    @SonAyoD 2 ปีที่แล้ว

    the next brad travesty!

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      I used to watch Brad all the time back in the day! He is one of the main sources I learned from when starting, so this comment brings a smile to my face. Thanks :)

    • @SonAyoD
      @SonAyoD 2 ปีที่แล้ว

      @@CooperCodes keep making videos my guy. It’s only a matter of time…

  • @webdevbuddy
    @webdevbuddy 2 ปีที่แล้ว

    It is free or not

    • @CooperCodes
      @CooperCodes  2 ปีที่แล้ว

      I believe auth0 is free up to 7000 active users and unlimited logins, you can see more by going to the Auth0 free plan website