Skip to content

Allow JWT_DECODE_AUDIENCE to be an array #219

@styk-tv

Description

@styk-tv

Hi. I have spent much time with your library and I use it a lot including for verification of outside OIDC issued tokens. I would like to propose JWT_DECODE_AUDIENCE to be an array so token verify would allow verification from multiple audiences.

Scenarios. Identity Clients accessing API:

  • CLI tool could be one consumer (direct grant)
  • Web client could be second consumer (implicit flow)
  • Web developer running on localhost could be third consumer (client has different redirects)

All issued by same provider, all valid. Only difference is each client has a different AUDience. It seems an a common practice to allow multiple audiences to be allowed to be verified in api. auth0/node-jsonwebtoken#4

So if I could do JWT_DECODE_AUDIENCE = ['ai.mysoft.web','ai.mysoft.cli','ai.mysoft.localhost'] that would be great. Does that make sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions