Skip to content

Nested property matchers for roles(?) #274

Answered by wernst
cahna asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @cahna , sorry for the delay in the response here. That should match via something like this:

export const roles: Roles = {
  admin: {
    match: {
      publicMetadata: {
        role: 'admin',
      }
      sub: '$userId',
    },
  },
  user: {
    match: {
      publicMetadata: {
        role: 'user'
      },
      sub: '$userId',
    },
  },
};

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wernst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants