IdentityModel / oidc-client-js

OpenID Connect (OIDC) and OAuth2 protocol support for browser-based JavaScript applications
Apache License 2.0
2.43k stars 841 forks source link

Injecting User into Session #1205

Open uchagani opened 4 years ago

uchagani commented 4 years ago

I'm testing an application that uses this library. I was wondering if there is a way for me to inject the user object found in the session storage so I can force the application into thinking I am already authenticated as the user in the session storage.

The tokens are not validated by the application I am testing and the APIs that do validate the token are being mocked. I am only testing the UI functionality.

Right now, when I inject the data found in the session storage for the user.oidc object the application ignores it and redirects me to authenticate. The application itself just calls getUser so I'm not sure what else I need to do (or if this is even possible).