Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript typing inconsistencies for the logout function #545

Closed
6 tasks done
Mgrdich opened this issue Jun 21, 2023 · 1 comment · Fixed by #548
Closed
6 tasks done

Typescript typing inconsistencies for the logout function #545

Mgrdich opened this issue Jun 21, 2023 · 1 comment · Fixed by #548
Labels
bug Something isn't working

Comments

@Mgrdich
Copy link

Mgrdich commented Jun 21, 2023

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

@Mgrdich Mgrdich added the bug Something isn't working label Jun 21, 2023
@frederikprijck
Copy link
Member

Thanks, I opened a PR to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants