-
Notifications
You must be signed in to change notification settings - Fork 52
Description
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
@PostMapping("/signin/twitter") public String loginWithTwitter(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ........ } @PostMapping("/callback") public void loginWithTwitterCallback(HttpServletRequest request, HttpServletResponse response) ...... Cookie cookie = new Cookie("twitterJwtToken", jwtToken); cookie.setSecure(false); cookie.setMaxAge(60 * 60 * 24); cookie.setPath("/"); response.addCookie(cookie); }
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.