You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
405 Method Not Allowed: SyntaxError: Unexpected token < in JSON at position 0 #36
Can you tell me how handle with this error ? I get 405 method not allowed.
react-twitter-auth-component.js:359 POST http://divelog.com.s3-website-us-east-1.amazonaws.com/callback 405 (Method Not Allowed) LogIn.js:65 SyntaxError: Unexpected token < in JSON at position 0
I also tried change type of request to GET and later POST but error is the same and can you tell me how can I use this component on localhost ? I try do it, but I get cors error at client side. I use React JS. I have added cors at server side in Spring Boot.
Same to me, I think this error occurs because the package expects a json on the return of the backend and you are sending an HTML, that's why the error is Unexpected token < in JSON, the "<" character is the initial tag of your HTML.
Activity
alexandrtovmach commentedon Dec 11, 2019
Try this package instead https://www.npmjs.com/package/react-twitter-login
Erickinhou commentedon Feb 17, 2022
Same to me, I think this error occurs because the package expects a json on the return of the backend and you are sending an HTML, that's why the error is Unexpected token < in JSON, the "<" character is the initial tag of your HTML.