Skip to content

Using Firefox and Safari, jwt.verify raises Error.capturestacktrace is not a function #402

@tsetenl2

Description

@tsetenl2

I've started testing my application outside of Chrome and started receiving the error regarding Error.capturestacktrace is not a function.

I have both the latest Firefox and Safari. The token verification works fine on the latest version of Chrome. This error occurs specifically after the token is expired and I attempt to verify it.

The token verification below is executed during specific route transitions on the client side. The error caused prevents me from logging inside of the verification callback.

 jwt.verify(
      token,
      secret,
      function(err, verifiedJwt) {
        if (err) {
          if (
            err.name === "TokenExpiredError" ||
            err.name === "JsonWebTokenError"
            ) {
            next("/logout");
        }
      } else {
          //Refresh token if it is not expired
          store.dispatch("REFRESH_TOKEN", token);
        }
      }
  );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions