FusionAuth / fusionauth-react-sdk

An SDK for using FusionAuth with React
https://fusionauth.io/docs/quickstarts/#single-page-app
Apache License 2.0
10 stars 4 forks source link

Allow withRole in RequireAuth to be an array of strings #52

Closed ColinFrick closed 1 year ago

ColinFrick commented 1 year ago

What is this PR and why do we need it?

Extend RequireAuth to allow multiple roles in the withRole parameter.

I was unable to add a test with the mocked up fetch call, but I added it with a static context provider. Hope that is sufficient.

Pre-Merge Checklist (if applicable)

Closes #50

Aaron-Ritter commented 1 year ago

@mooreds

mooreds commented 1 year ago

Released 0.26 which includes this fix.