Sign Up to Track Progress

Thank You for Watching!

A quick thank you to all those who watched! If you have feedback, please let us know down in the comments.

Published
Jun 29, 24
Duration
0m 31s

Developer, dog lover, and burrito eater. Currently teaching AdonisJS, a fully featured NodeJS framework, and running Adocasts where I post new lessons weekly. Professionally, I work with JavaScript, .Net C#, and SQL Server.

Adocasts

Burlington, KY

Visit Website

Get the Code

Download or explore the source code for this lesson on GitHub

Repository

Join The Discussion! (21 Comments)

Please sign in or sign up for free to join in on the dicussion.

  1. Commented 9 months ago

    Thank you, Tom. It was a great course!

    2

    Please sign in or sign up for free to reply

    1. Commented 9 months ago

      Thank you very much, Dima!

      1

      Please sign in or sign up for free to reply

  2. Commented 5 months ago

    Thank you Tom. Eternally grateful.

    1

    Please sign in or sign up for free to reply

    1. Commented 5 months ago

      Thanks for watching, wechuli!! 😊

      0

      Please sign in or sign up for free to reply

  3. Commented 3 months ago

    Thank you for this course. I’ve learned so much, but there’s still so much more to learn. Next time, I’ll start the series on Inertia.

    By the way, out of curiosity, how did you discover AdonisJS? I hope you’ll continue teaching AdonisJS. I absolutely love this framework. 😍

    What do you have planned for 2025? Complete e-commerce website with Stripe, all the way to deployment, would be amazing. 😊

    Happy New Year 🥳

    1

    Please sign in or sign up for free to reply

    1. Commented 3 months ago

      Thank you for watching, gribbl! I'm ecstatic to hear you learned a lot from it and are loving AdonisJS!!

      I discovered AdonisJS back in the early AdonisJS 4 days. I was previously working with Laravel, but I work primarily with JavaScript and found AdonisJS searching for a JavaScript alternative to Laravel. 😊

      I've had a lot of requests for some API content, so we'll be doing a series on adding an API to the PlotMyCourse application we're currently making in the Building with AdonisJS & Inertia series. On top of that, we'll also be doing a todo series, showing how to make a todo app in a bunch of different ways with AdonisJS. I have some other ideas on our schedule page, but those are more open to changes before we get to them. I like the idea of an e-commerce site, I'll add that to the ideas, thank you for the suggestion!! 😊

      Happy New Year to you as well!! 🎉

      1

      Please sign in or sign up for free to reply

      1. Commented 3 months ago

        I hadn’t seen the schedule page. Nice !

        The idea of an API is great. I have trouble understanding how an API and a frontend app communicate with each other, especially how to properly handle authentication. 😆

        1

        Please sign in or sign up for free to reply

        1. Commented 3 months ago

          Yeah, those seem to be the areas most struggle with on APIs 😊. Using the PlotMyCourse application also gives us a cool opportunity to cover authentication with a non-user entity.

          1

          Please sign in or sign up for free to reply

  4. Commented 3 months ago

    Thank you for this great tutorial. I'm a beginner but I managed to get to the end.

    2

    Please sign in or sign up for free to reply

    1. Commented 3 months ago

      That's awesome to hear marion-huet!!! Thank you for watching! I hope you enjoyed and also found everything easy to understand and follow.

      1

      Please sign in or sign up for free to reply

  5. Commented 1 month ago

    Thank you! 🎊🎉🥳

    1

    Please sign in or sign up for free to reply

    1. Commented 1 month ago

      Thanks so much for watching, cortesbr!! ❤️

      0

      Please sign in or sign up for free to reply

  6. Commented 5 days ago

    Thank you, Tom Gobich. Absolutely brilliant course! I spent two weeks watching all your videos, and even though I relied on a translator, your clear explanations kept everything crystal clear. I’m confident this is a fantastic starting point for understanding and using AdonisJS. Thanks again!

    🙏
    1

    Please sign in or sign up for free to reply

    1. Commented 5 days ago

      Thanks so much, codthing!! I greatly appreciate that! I'm really happy to hear everything was easy to follow even with using a translator!

      1

      Please sign in or sign up for free to reply

  7. Commented 4 days ago

    Tom Gobich,Is the auth-token generated by default in AdonisJS a JWT token? If not, what should the frontend use to parse it? I tried parsing it with jwt-decode。

    const authConfig = defineConfig({
      default: 'api',
      guards: {
        api: tokensGuard({
          provider: tokensUserProvider({
            tokens: 'accessTokens',
            model: () => import('#models/user'),
          }),
        }),
      },
    })
    1

    Please sign in or sign up for free to reply

    1. Commented 4 days ago
      const jwt_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c";
              
              const decoded_jwt_token = jwt_decode(token);
              console.log(decoded_jwt_token);
              //{sub: '1234567890', name: 'John Doe', iat: 1516239022}
            
      0

      Please sign in or sign up for free to reply

      1. Commented 4 days ago
        const adonisjs_token = "oat_NjA.N1J1SGpxVlVLZjdLc2NmTVJXdUxPWDFkbjFrWFpIbmo5VmRSVVVRczEzNjg1NTc4Mzc"
        
        const decoded_adonisjs_token = jwt_decode(adonisjs_token)
                console.log(decoded_adonisjs_token);
                // 'Invalid token specified: Unexpected non-whitespace…racter after JSON at 
                //  position 1 (line 1 column 2)', stack: 'InvalidTokenError\n
        0

        Please sign in or sign up for free to reply

    2. Commented 4 days ago

      I want to use a JWT token because I'm considering that the frontend might need to check the token's expiration time to proactively refresh-token. I'm not sure which approach is better. I'd love to hear your opinion.

      1

      Please sign in or sign up for free to reply

      1. Commented 3 days ago

        AdonisJS uses Opaque Access Tokens (OAT), sometimes referred to as a by-reference token. Unlike JWTs, with opaque tokens the source of truth is the database and the only thing meant to read the token is the issuing server.

        Since the source of truth is the database, in order for a token to be verified it must go through the server via an introspection endpoint. This also means tokens can be readily revoked at any time. This makes opaque tokens more secure than JWTs, as it follows the never trust, always verified methodology. Since the token can be revoked at any time and doesn't contain any user information they can have a longer expiry than JWT access tokens. However, since it needs to verify the token with the server, it can be less scalable at high user levels.

        Here's more on the matter from AdonisJS' creator.

        That said, if you would like to use JWTs with AdonisJS, you can give MaximeMRF's JWT package a go! That should get you all set up!

        1

        Please sign in or sign up for free to reply

        1. Commented 3 days ago

          thank you very much!

          1

          Please sign in or sign up for free to reply

          1. Commented 3 days ago

            Anytime!!

            0

            Please sign in or sign up for free to reply