auth0/auth0-react

Typescript typing inconsistencies for the logout function

Mgrdich opened this issue · 1 comments

Checklist

Description

const logout = useCallback(
async (opts: LogoutOptions = {}): Promise<void> => {

logout here is a promise , while when we use the hook to retrieve it is not typed as such , and we will end up with type inconsistencies

logout: (options?: LogoutOptions) => void;

why they are different is it intentional ?

Reproduction

  1. Check the interface typing
  2. Check the code that is run with the actual provider

Additional context

No response

auth0-react version

2.1.0

React version

18.2.0

Which browsers have you tested in?

Other

Thanks, I opened a PR to address this.