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

React API demo throwing unauthorized #3075

Closed
bmmathe opened this issue Dec 21, 2016 · 3 comments
Closed

React API demo throwing unauthorized #3075

bmmathe opened this issue Dec 21, 2016 · 3 comments

Comments

@bmmathe
Copy link

bmmathe commented Dec 21, 2016

I'm downloaded the API example: https://auth0.com/docs/quickstart/spa/react/08-calling-apis
After fixing an issue with the packages npm start script to get it running in WINDOWS I get an Unauthorized "invalid signature" error when hitting the private api endpoint.
I followed another thread's advice to change port from 3000 to something else but that also didn't work.
Is this a Windows only issue?

@bmmathe
Copy link
Author

bmmathe commented Dec 21, 2016

auth0/node-jsonwebtoken#208

@mgkeen solution in the above thread fixed my issue for this example.

var authenticate = jwt({ secret: new Buffer(process.env.AUTH0_SECRET, 'base64'), audience: process.env.AUTH0_CLIENT_ID });

@miro-ur
Copy link

miro-ur commented Dec 27, 2016

Having the same issue on Win10. Deployed on Ubuntu is fine. Could not figure out a fix for NodeJS on win ? What is the solution here ?

@bmmathe
Copy link
Author

bmmathe commented Dec 28, 2016

Locate package.json in the root folder.
In the "scripts" section change the dev-server line to the following:
"dev-server": "cross-env NODE_ENV=development hjs-dev-server"

@chenkie chenkie closed this as completed Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants