impersonatedBy missing in admin session
I am using the admin plugin for impersonation. When i get the current data with auth.api.getSession(), the TypeScript type for the session does not include the impersonatedBy field, so when I try to access it for conditional rendering I get a TS error. At runtime it works correctly, and the impersonatedBy field is present in the JS session object as null or with the correct ID. How can I make my auth instance aware I am using the admin plugin so it knows impersonatedBy is in the session object?
Solution
Hello, types should had inferred correctly if you're using auth.api and have included the admin plugin.
May I see the
May I see the
useAuth hook? @chris