Announcement Announcement Module
Collapse
No announcement yet.
Getting 404 when clicking on Logging in with Facebook and Twitter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Just like the signin pages, the connection pages are application-defined, too. This is at least implied in http://static.springsource.org/sprin...troller-flow-2, but perhaps it should be made more clear that the connection form is app-defined. Notice that it's also app-defined in the showcase example.

    Comment


    • #17
      Originally posted by habuma View Post
      Just like the signin pages, the connection pages are application-defined, too. This is at least implied in http://static.springsource.org/sprin...troller-flow-2, but perhaps it should be made more clear that the connection form is app-defined. Notice that it's also app-defined in the showcase example.
      Thanks. Looking at that documentation it says

      "To kick off the connection flow, the application should POST to /connect/{providerId}. Continuing with the Twitter example, a JSP view resolved from "connect/twitterConnect" might include the following form:"

      That sounds like the cart in front of the horse. For instance, in our app that "form" is on the index page, and it is after that that we get the 404 error trying to go to "connect/twitterConnect" so after the form, not before.

      So that doc actually confused me more.

      Thanks

      Mark

      Comment


      • #18
        OK. at this point I have create two .jsp pages one for Twitter and one for Facebook called facebookConnect.jsp and twitterConnect.jsp in which they are identical. importing my registration form and headers/nav like

        Code:
        <%@ include file="../headers.jsp"%>
        <body>
                <%@ include file="../nav/navigation.jsp"%>
                <%@ include file="../forms/accountDetails.jsp"%>
        </body>
        </html>
        Now, I haven't been using Spring's form taglib. I kind of wanted to avoid all the jsp things. But it looks like in order to get one of my domain objects for registration populated with the social User object I will have to get the data into the model. I will open another thread for that question.

        Thanks

        Mark

        Comment


        • #19
          Same issue - resolved

          I've just upgraded a website that uses Spring Social from Java 6 to Java 7 and I ran into the same issue Mark has ... I get redirected to http://localhost:8080/signin?error=provider during the sign-in process and the logs indicate that /signin/twitter is not found (404).

          It took a while to debug but, in my case anyway, the fix was simple and relates to Java 7 being shipped with limited crypto. If you are having the same issue, try the following:

          - Change text encryption to use "noOpText" (the textEncryptor dependency on your JdbcUsersConnectionRepository bean).
          - If your app starts working, revert the above change and install "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7" (http://www.oracle.com/technetwork/ja...ad-432124.html)

          I created a basic unit test around the text encryptor stuff and it fails under Java 7 with "java.lang.IllegalArgumentException: Unable to initialize due to invalid secret key". A quick Google search shows that the default JVM crypto is limited and not compatible.

          Code:
          import org.junit.Test;
          import org.springframework.security.crypto.encrypt.Encryptors;
          import org.springframework.security.crypto.encrypt.TextEncryptor;
          
          public class EncryptorTest {
          
            @Test
            public void testEncryption() {
              TextEncryptor te = Encryptors.text("password", "abcdef");
              te.encrypt("Hello World!");
            }
          
          }
          I think something inside of Spring is hiding this exception ... at least I couldn't see it in my logs.

          Hope that helps.

          Cheers
          Simon

          Comment


          • #20
            Simon: It's odd that you get a 404, but nonetheless. This sounds like a potential Java 7-related bug in Spring Security. If you've not done so already, you should post your findings as a bug at https://jira.springsource.org/browse/SEC for the Spring Security guys to look into.

            Comment


            • #21
              Originally posted by habuma View Post
              Simon: It's odd that you get a 404, but nonetheless. This sounds like a potential Java 7-related bug in Spring Security. If you've not done so already, you should post your findings as a bug at https://jira.springsource.org/browse/SEC for the Spring Security guys to look into.
              Also, iirc. I had read somewhere about having to download those policy files because Spring Security Crypto uses 128 bit??? That the built in JDK ones could only allow 32 bit and that was the problem. Not sure exactly, as my memory is terrible after 1 week.

              Mark

              Comment

              Working...
              X