I am trying to use react with auth0 and finally got stuff working and wanted to update a user. First thing I noticed was that I do not have a user_id on my profile. I have a sub field, but I am not sure if that is an actual id or not.
Second issue is that I keep getting: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.
I have put http://localhost:3000 inside of the ACAO stuff in the Auth0 settings and even with axios tried to allow it, but it still isn’t working. I am not sure if this is due to using the wrong user_id
First things first, did you follow the React quickstart? What version of Lock are you using? Secondly, do you have your CORS URLs defined in the Dashboard?
Are you making the call directly from your react app? If you’re trying to use the /oauth/token endpoint directly from the browser it will not respond with CORS headers. As to avoid the endpoint being used on the browser, we recommend you use cross origin authentication instead of POST /oauth/token. Please let me know if this is the case for you, if not if you could provide the code you are using.
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access.