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

Allowing JWE aswell as JWT tokens #66

Open
uplift opened this issue Nov 21, 2018 · 4 comments
Open

Allowing JWE aswell as JWT tokens #66

uplift opened this issue Nov 21, 2018 · 4 comments

Comments

@uplift
Copy link
Contributor

uplift commented Nov 21, 2018

In my quest to bring our custom version of this project inline with the official release, I have one more task to make them the same.

Our payload cookie is currently encoded using JWE tokens instead of basic JWT. Would it be possible to add a config in the Admin Setting page that allows the switch to JWE encryption?

@julianlam
Copy link
Owner

Would that require a new dependency? It doesn't look like jsonwebtoken supports JWE. If so, do you have a recommended module?

@uplift
Copy link
Contributor Author

uplift commented Nov 29, 2018

Yes it would. We currently use https://github.com/cisco/node-jose

@julianlam
Copy link
Owner

@uplift If I am reading this correctly, we would be removing our dependency on node-jsonwebtoken and instead use node-jose, is that right?

Seems like a fairly major operation, and wouldn't be backwards compatible with pre-existing installs, unless node-jose can produce a JWS (which is what node-jsonwebtoken currently outputs)

@sl354207
Copy link

Hi @julianlam. I am curious if it's possible to add this feature as well.

This library https://github.com/panva/jose seems potentially more widely used than the one mentioned above and can produce a JWS for backwards compatibility.

It would also allow for different signing algorithms as requested in issue #31.

I'm not an expert on JWT's or nodebb but I'd be willing to help if you're interested.

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

No branches or pull requests

3 participants