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

validateAccessToken is not a function #751

Closed
brassier opened this issue May 3, 2018 · 6 comments
Closed

validateAccessToken is not a function #751

brassier opened this issue May 3, 2018 · 6 comments

Comments

@brassier
Copy link

brassier commented May 3, 2018

I'm running auth0-js 9.2.3 and logins work well. I'm simply trying to upgrade above 9.3 to cover me from this. I'm getting the following error in Chrome logins. If I downgrade back to 9.2.3 logins work fine again.

[Unhandled Exception: [(intermediate value).validateAccessToken is not a function]]

This all begins in my code when I call webAuth.parseHash() after a valid login, which eventually lands here:

return new IdTokenVerifier().validateAccessToken(

This seems to be where the error is coming from. Am I missing something, or did something break after 9.2.3?

@luisrudge
Copy link
Contributor

@brassier are you also importing the library idtoken-verifier?

@brassier
Copy link
Author

brassier commented May 3, 2018

I'm not importing it in my code, no. I'm not using it directly. I do see it in the node_modules directory so I assume auth0-js is installing it.

Is importing idtoken-verifier a new requirement for using webAuth.parseHash()?

@luisrudge
Copy link
Contributor

No, I was just asking to see if you had a version mismatch. validateAccessToken was added in [email protected] (auth0/idtoken-verifier#17), which was released in [email protected] (#709). So, anything beyond 9.4.0 should have the new idtoken-verifier package, and any version before 9.4.0 shouldn't be trying to use validateAccessToken. Are you testing this locally?

@brassier
Copy link
Author

brassier commented May 4, 2018

I see. I do have @auth0/[email protected] installed, which pulls in [email protected], which pulls in [email protected]. Maybe that's where the conflict is coming in?

@luisrudge
Copy link
Contributor

Yeah, it absolutely is. Once you fix this versions, you'll be able to use it just fine.

@brassier
Copy link
Author

I'm just getting back to this. FYI - I confirmed that this was the case that the @auth0/cordova version was conflicting with the auth0-js version. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants