react-oidc-context icon indicating copy to clipboard operation
react-oidc-context copied to clipboard

Bypass Authentication or Hydrate Auth-Object in Development mode

Open rabbl opened this issue 3 months ago • 1 comments

Hi React-Oidc-Context - Development Team, We are devrloping locally our application but at the moment we are authenticate against a dev-keycloak instance which is not working locally. For API-Mocking we are using MirageJS and in the previous projects I always mocked the auth-API-routes with mirage and so I could fake the logged-in user.

Now with OpenIdConnect and their Authentication-System I haven't found a way to fake the user in a nice way. I was wondering if you possibly have an idea or have seen a way to bypass the auth-flow for local development?

I my opinion this could be possible over 3 ways:

  • mock openid-api-routes with miragejs (possbly for implicit flow?)
  • instantiate auth-objects with usermanager somehow for dev-mode
  • implement redux and sync auth-object in the application lifetime

Does anybody has another idea?

Best regards and thank you :), Ralf

rabbl avatar Mar 11 '24 12:03 rabbl