Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to ignore alg type #341

Closed
OscBacon opened this issue Jul 24, 2024 · 2 comments
Closed

Add option to ignore alg type #341

OscBacon opened this issue Jul 24, 2024 · 2 comments
Labels

Comments

@OscBacon
Copy link

Summary

Hey, first off, amazing tool!

When using the firebase emulator, the jwt has alg: "none"
I would like the cli to still decode the jwt for debug purposes. Right now, I'm falling back to the debugger on jwt.io

Steps to reproduce

Example jwt:

eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJhdWQiOiJodHRwczovL2lkZW50aXR5dG9vbGtpdC5nb29nbGVhcGlzLmNvbS9nb29nbGUuaWRlbnRpdHkuaWRlbnRpdHl0b29sa2l0LnYxLklkZW50aXR5VG9vbGtpdCIsImlhdCI6MTcyMTgzMjc1NywiZXhwIjoxNzIxODM2MzU3LCJpc3MiOiJmaXJlYmFzZS1hdXRoLWVtdWxhdG9yQGV4YW1wbGUuY29tIiwic3ViIjoiZmlyZWJhc2UtYXV0aC1lbXVsYXRvckBleGFtcGxlLmNvbSIsInVpZCI6InZCNDQ0WU9nZ21LWk5XVzZQQ0NRUTM2RTFQT2IiLCJjbGFpbXMiOnsiZG9tYWluIjoiaHR0cDovL2xvY2FsaG9zdDo1MTc0In19.

Expected behavior

As per the jwt.io debugger:

Header

{
  "alg": "none",
  "typ": "JWT"
}

Payload

{
  "aud": "https://identitytoolkit.googleapis.com/google.identity.identitytoolkit.v1.IdentityToolkit",
  "iat": 1721832757,
  "exp": 1721836357,
  "iss": "[email protected]",
  "sub": "[email protected]",
  "uid": "vB444YOggmKZNWW6PCCQQ36E1POb",
  "claims": {
    "domain": "http://localhost:5174"
  }
}
@mike-engel
Copy link
Owner

Hi @OscBacon, thanks for the suggestion! Unfortunately, it doesn't look like jsonwebtoken will be supporting this, which would be required. I'll keep this open as a tracking issue

@mike-engel
Copy link
Owner

Actually, I think this is a dupe of #253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants