Git Product home page Git Product logo

Comments (5)

Camji55 avatar Camji55 commented on May 25, 2024 1

@yovanoc, The latest release, v1.1.0 https://github.com/Camji55/nexus-plugin-jwt-auth/releases/tag/v1.1.0 adds a setting to pass in custom verify logic. I'll leave this Issue open for the time being because I would like to get it documented and possibly add a sign setting.

from nexus-plugin-jwt-auth.

AzSiAz avatar AzSiAz commented on May 25, 2024 1

Possible to add an "async" verify, to use with something like this:

import * as jwt from 'jsonwebtoken'

export const verifyToken = (req: Request, next) => {
    const token = extractToken(req)
    jwt.verify(token, getKey, (err, decoded) => {
        next(decoded)
    })
}

My purpose is to verify a token from auth0

from nexus-plugin-jwt-auth.

fflores97 avatar fflores97 commented on May 25, 2024 1

May I also suggest making the appSecret argument optional? If one implements any non-secret-based JWT verification (as is the case with @AzSiAz and myself), the secret isn't used in the logic at all.

from nexus-plugin-jwt-auth.

Camji55 avatar Camji55 commented on May 25, 2024 1

May I also suggest making the appSecret argument optional? If one implements any non-secret-based JWT verification (as is the case with @AzSiAz and myself), the secret isn't used in the logic at all.

@fflores97 & @AzSiAz: Would this work for y'all? https://github.com/Camji55/nexus-plugin-jwt-auth/pull/45/files

from nexus-plugin-jwt-auth.

fflores97 avatar fflores97 commented on May 25, 2024

Looks great! Way better than the hacky thing I put together hahaha. Thanks for the work @Camji55 !

from nexus-plugin-jwt-auth.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.