Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    API - issue for the token lifetime

    Knowledge Base
    2
    6
    386
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mhsabry last edited by

      I have an issue for the token lifetime ... it is live just one hour ... how can I control it

      1 Reply Last reply Reply Quote 0
      • V
        Vaishali Agarwal last edited by

        @mhsabry
        are you getting this issue in Bagisto? if yes then show me the error please.

        1 Reply Last reply Reply Quote 0
        • M
          mhsabry last edited by

          Sorry, it is not an issue but I mean

          Is there a way to control the token life time?

          when I try to use the generated token after I login directly it response me with the data but if I use the token after one hour it gives me

          Symfony\Component\Routing\Exception\RouteNotFoundException: Route [auth.login] not defined. in file /var/www/html/bagisto/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 420
          
          1 Reply Last reply Reply Quote 0
          • V
            Vaishali Agarwal last edited by Vaishali Agarwal

            @mhsabry
            please go to the .env file and increase your SESSION_LIFETIME

            1 Reply Last reply Reply Quote 0
            • M
              mhsabry last edited by

              I fixed it by adding

              JWT_TTL=NULL
              

              in .env file

              and comment 'exp',

                  'required_claims' => [
                      'iss',
                      'iat',
                  //    'exp',
                      'nbf',
                      'sub',
                      'jti',
                  ],
              

              on config/jwt.php file

              1 Reply Last reply Reply Quote 0
              • V
                Vaishali Agarwal last edited by

                @mhsabry
                Great 🙂

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post