Comments (5)
@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.
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.
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.
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.
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)
- Network error: {"errors":[{"message":"jwt malformed"}]} HOT 3
- Type definition of "token" on context not correct HOT 12
- Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm. HOT 1
- Unable to build nexus server HOT 1
- Update nexus-plugin-prisma in examples
- Wildcard Route Protection HOT 1
- Property ... does not exist on type 'string'. HOT 1
- Feature Request: Add testing example
- How to authenticate subscriptions?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nexus-plugin-jwt-auth.