bjerkio/oidc-react

Avoiding "No authority or metadataUrl configured" when authentication isn't needed?

lupuchard opened this issue · 0 comments

My app only requires authentication in certain contexts, but if oidc configuration is omitted from the AuthProvider, I get the error "No authority or metadataUrl configured on settings". I can't conditionally render AuthProvider because it's required for useAuth() and react doesn't allow the conditional use of hooks.

Is there any way to omit authentication in the AuthProvider without getting this error?