JWTs must have three components
See original GitHub issueDescription 🐜
Hi when I’m trying to pull the jwt accestoken I have error:
JWTs must have three components
I’ve ussed snippet from documentation.
I’m using Google auth with firebase.
Is this a bug in your own project?
Yes
How to reproduce ☕️
import jwt from 'next-auth/jwt'
const secret = process.env.GOOGLE_SECRET
export default async (req, res) => {
const token = await jwt.getToken({ req, secret })
if (token) {
// Signed in
console.log('JSON Web Token', JSON.stringify(token, null, 2))
} else {
// Not Signed in
res.status(401)
}
res.end()
}
response:
JWTMalformed: JWTs must have three components
.....
{
code: 'ERR_JWT_MALFORMED'
}
Screenshots / Logs 📽
No response
Environment 🖥
System: OS: macOS 11.4 CPU: (8) arm64 Apple M1 Memory: 106.19 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.3 - ~/.nvm/versions/node/v14.17.3/bin/node npm: 6.14.13 - ~/.nvm/versions/node/v14.17.3/bin/npm Browsers: Brave Browser: 91.1.26.74 Chrome: 92.0.4515.131 Safari: 14.1.1 npmPackages: next: 11.0.1 => 11.0.1 next-auth: ^3.27.3 => 3.27.3 react: 17.0.2 => 17.0.2
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
What does 'JWT must have 3 parts' mean? - Auth0 Community
I can authenticate, I receive the 'authResult' object but clearly 'access_token' is invalid as a bearer token. I have gotten my api to...
Read more >Angular2 JWT Authentication - JWTs must come in 3 parts?
This site can tell you if it's a valid JWT and can decode its contents, so you can prove that it correct. Save...
Read more >A Beginner's Guide to JWTs - Okta Developer
There are three types of claims: "registered," "public," and "private." You can find the list of registered and public claims in the official ......
Read more >JSON Web Token (JWT) - IBM
Figure 1 shows that a JWT consists of three parts: a header, payload, and signature. Header: The header typically consists of two parts:...
Read more >JWT: The Complete Guide to JSON Web Tokens
Having a detailed overview of JWTs is essential for: ... A JWT is made of 3 parts: the Header, the Payload and the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There are dummy secrets for reproduce purpose 😃
On Tue, 17 Aug 2021, 12:48 Balázs Orbán, @.***> wrote:
Not wasting my time! 😉 If you find a way to reliably reproduce this issue, I will be happy to look at it again!