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

Generated typescript declaration for Auth0VueClient.user and Auth0VueClient.idTokenClaims is incorrect regarding undefined #237

Closed
6 tasks done
SimonSimCity opened this issue Jul 6, 2023 · 1 comment
Labels
bug This points to a verified bug in the code

Comments

@SimonSimCity
Copy link

Checklist

  • The issue can be reproduced in the auth0-vue sample app (or N/A).
  • I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

The type declaration bundled with the code on npm contains incorrect typings for Auth0VueClient.user and Auth0VueClient.idTokenClaims.

Here's an excerpt of the code which I found in the package downloaded from npm:

export interface Auth0VueClient {
    /**
     * Contains the information of the user if available.
     */
    user: Ref<User>;
    /**
     * Contains all claims from the id_token if available.
     */
    idTokenClaims: Ref<IdToken>;
}

But according to what I see here in the repo (https://github.com/auth0/auth0-vue/blob/main/src/interfaces/auth0-vue-client.ts), both of them should be a Ref also allowing undefined as value.

Reproduction

  1. Install the package @auth0/auth0-vue in version 2.2.0.
  2. Check the typing for user and idTokenClaims on the interface Auth0VueClient.

Additional context

-/-

auth0-vue version

2.2.0

Vue version

3.3.4

Which browsers have you tested in?

Other

@SimonSimCity SimonSimCity added the bug This points to a verified bug in the code label Jul 6, 2023
SimonSimCity added a commit to bcc-code/bmm-web that referenced this issue Jul 6, 2023
@frederikprijck
Copy link
Member

Thanks, this was fixed but not yet released. I will cut a release today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

2 participants