add an async `getUser` function to `Auth0ContextInterface`
Description
the Auth0ContextInterface provides auth state and a bunch of async methods for updating that auth state. the user, however, is only populated in state as a side effect of other methods (namely getAccessTokenSilently, getAccessTokenWithPopup, and handleRedirectCallback) which means there is no way for a client to guarantee they have access when they first mount the hook. the standard way to deal with this is with an effect -- mount the hook, call getAccessTokenSilently or something, and rerender when the user is fetched. however, this isnt always possible, for instance tanstack router's beforeLoad method is a place where it would be really useful to await a user (to determine if they have access to this specific route). as of now, this library provides no way to do this, so i added this quick wrapper around the client.getUser method, for use in contexts where we cant rely on rerenders.
Testing
i relied on unit tests to test this, but theyre not particularly inspired -- given that this function just wraps client.getUser there really isnt much to test here.
- [x] This change adds test coverage for new/changed/fixed functionality
Checklist
- [ ] I have added documentation for new/changed functionality in this PR or in auth0.com/docs
- i didnt, but i can if it's deemed useful... i noticed that there are a handful of simple/self-explanatory methods that arent specifically called out in the examples, e.g.
getAccessTokenWithPopup
- i didnt, but i can if it's deemed useful... i noticed that there are a handful of simple/self-explanatory methods that arent specifically called out in the examples, e.g.
- [ ] All active GitHub checks for tests, formatting, and security are passing
- [ ] The correct base branch is being used, if not the default branch