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

Using Refresh Tokens as an Opaque Encrypted Access Tokens #72

Open
mr-blue-sky opened this issue Dec 22, 2021 · 0 comments
Open

Using Refresh Tokens as an Opaque Encrypted Access Tokens #72

mr-blue-sky opened this issue Dec 22, 2021 · 0 comments

Comments

@mr-blue-sky
Copy link

Hi :)
First of all, thank you very much for your hard work on this library! It's amazing 😊

I'm considering not exposing the JWT access tokens directly to the clients, and instead, implementing an API gateway that will convert the refresh tokens to JWTs on every request. The JWTs will be passed then to the internal microservices to ensure in-bounds security.

To do this, the client only needs access to the refresh tokens, as the regular JWTs (that will have an extremely short lifespan) are only used to authenticate and authorize the user internally. I plan to include all the permissions and scope information inside those JWTs, while the refresh token will only have a user payload.

I have 2 questions:

  1. Will this architecture work? Is it secure?
  2. Can I covert those refresh tokens into opaque encrypted tokens, to expose less information to the client?

Thank you very much! 😄

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

1 participant