Skip to content

Support non-URL audience in third party tokens #142

@jbojcic1

Description

@jbojcic1

Currently when creating third party JWT, generateThirdPartyToken in @opensecret/react sdk, takes optional audience as a parameter. If not set, a JWT with no audience restriction will be generated. Such token does not have aud claim set in the decoded JWT payload.

If set, OpenSecret requires it to be in URL format and then the decoded JWT payload will have aud claim with that URL. If invalid (non-URL) format is passed to generateThirdPartyToken method, 400 response is returned with "bad request" message. However, this is problematic if third party systems which this token is used with require different audience value. One such example is Supabase platform where audience can refer to one of the roles in Supabase system like authenticated or anon (see Supabase aud description here) and not a URL.

Thus, Open Secret should allow other string values for audience and not just URL format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions