Hasura + Auth0 tutorial including multi-role setup and testing/debugging with jwt.io.

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ม.ค. 2025
  • This video tutorial is perfect if you want to get started with integrating auth0 and Hasura. This video also shows you how to setup and test with Auth0 without doing a UI integration so that you can try things out quickly.
    It's also a great way to try out JWT based auth with Hasura, even if you're not planning on using Auth0. This video covers creating custom JWT claims that Hasura can use in its authorization rules and a testing + debugging workflow with JWT and Hasura using jwt.io and the Hasura console.
    Topics covered:
    1. Creating an account on Auth0
    2. Login with Auth0 to create a JWT (without building a UI)
    3. Create permissions to enforce authorization on Hasura
    4. Add Hasura claims to Auth0 JWTs using Rules
    5. Testing GraphQL authz using JWT via the console
    6. Multi-role authorization
    For more information head to docs.hasura.io or hit us up on our discord server at / discord .

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

  • @mike73783
    @mike73783 5 ปีที่แล้ว +6

    If you get a "oops, something went wrong error" at 4:00 try disabling the "OIDC Conformant" setting from Settings -> Show Advanced Settings -> Oauth.

    • @TheElliotkoss
      @TheElliotkoss 3 ปีที่แล้ว

      This no longer appears to work.

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

    This tutorial does cover almost everything that I had a hard time understanding, Thanks a lot Tanmai

  • @oldschoolshoe
    @oldschoolshoe 3 ปีที่แล้ว

    Many thanks for this overview with the specific implementation steps. It’s notable how many tutorials and articles bypass setting up authentication with GraphQL. I’m still working through the exact steps to implement what was shown here, but having a perspective on how authentications fits in with the whole data workflow for an application is valuable. Thank you.

  • @CoryTheSimmons
    @CoryTheSimmons 5 ปีที่แล้ว +3

    Hot damn this was perfectly timed I love you guys. :D

  • @creative-commons-videos
    @creative-commons-videos 5 ปีที่แล้ว +4

    am I stuck with Auth0, what if I don't want to use it and instead want to use custom jwt nodejs api ?? how to use that ?

  • @LetterSignedBy51SpiesWasA-Coup
    @LetterSignedBy51SpiesWasA-Coup 5 ปีที่แล้ว +2

    Great overview. Would you happen to know of an example that sets different roles for different users? for example: user, admin, superadmin

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

    Could you make an upgrade version of this content.?

  • @arsalanshaikh3763
    @arsalanshaikh3763 5 ปีที่แล้ว +2

    Thanks for this awesome tutorial hasura is very promising please do a video on developing a graph ql
    backend with hasura locally.Thanx love from Pune

  • @TarasShevchenkoStep
    @TarasShevchenkoStep 5 ปีที่แล้ว +2

    Wow! Genius... So complicated steps )) And not so simple as I think. Very interesting if it can be optimized by scripts. And with free passport.js But anyway thank you! Great video!!!

    • @HasuraHQ
      @HasuraHQ  5 ปีที่แล้ว +1

      Yes!
      I wish Auth0 had a quick test URL for their universal web login. That would make things SO much easier :)

    • @TarasShevchenkoStep
      @TarasShevchenkoStep 5 ปีที่แล้ว

      Hasura Maybe we can inform them to do this?

  • @FelipeCosta7
    @FelipeCosta7 5 ปีที่แล้ว +1

    Thanks for this video and for this incredible piece of software, Hasura is amazing.
    How can I make a request to Hasura from Auth0 during the Rule execution to get some metadata information from my database that I want to use to compose the token?
    The restriction is that I don't want to use admin secret to make the request, neither anonymous queries.

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

    Any chances of this tutorial being updated?

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

    Does this tutorial applicable in react native?

  • @kiranyadav1765
    @kiranyadav1765 4 ปีที่แล้ว

    not getting the access token , using auth0-domain.auth0.com/login?client=client_id&protocol=oauth2&response_type=token%20id_token&redirect_uri=callback_uri&scope=openid%20profile, I am putting the auth0 domain and client-id and callback url, still not getting the access token

  • @noelsoong777
    @noelsoong777 5 ปีที่แล้ว

    Hi I don't seem to have a query param for accesstoken

  • @m.raghuram9039
    @m.raghuram9039 ปีที่แล้ว

    we need for firebase also

  • @thechen6985
    @thechen6985 3 ปีที่แล้ว +1

    Update: Dont put the HASURA_GRAPHQL_JWT_SECRET env variable on Heroku, instead go to the project details in Hasura itself and add it over there. This took me 0.5 days to find out. NEVER use the HASURA_ADMIN_SECRET in your environment to enforce the authentication! This was a solution I unfortunately saw a few times.
    full thread on github. @t

    • @ardinusawan13
      @ardinusawan13 3 ปีที่แล้ว

      Hi can you help me? I strugle with it. Can we pair? 🙏

    • @thechen6985
      @thechen6985 3 ปีที่แล้ว +1

      ​@@ardinusawan13 Hi, this is the location to put in the variable. Change your project_id to your project id
      cloud.hasura.io/project/PROJECT_ID/env-vars
      See image:
      imgshare.io/image/add-env-hasura.pjaFNO

    • @rafs.3206
      @rafs.3206 3 ปีที่แล้ว

      ​@@thechen6985 wait what..why?
      If you are hosting on Heroku and NOT on Hasura Cloud then Heroku Env Vars is absolutely the right place to put it.