jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.54k stars 4.02k forks source link

Social authentication with Google doesn't work when translation is disabled #2518

Closed titogeorge closed 8 years ago

titogeorge commented 8 years ago

I have created a new application with "enableTranslation": false, Only google properties are added in applicaton.yml. On sign in I get the error in attached screen shot.

screenshot from 2015-12-22 20-16-49

{
  "generator-jhipster": {
    "baseName": "y",
    "packageName": "com.titogeo.test",
    "packageFolder": "com/titogeo/test",
    "authenticationType": "session",
    "hibernateCache": "no",
    "clusteredHttpSession": "no",
    "websocket": "no",
    "databaseType": "mongodb",
    "devDatabaseType": "mongodb",
    "prodDatabaseType": "mongodb",
    "searchEngine": "no",
    "useSass": false,
    "buildTool": "maven",
    "frontendBuilder": "grunt",
    "enableTranslation": false,
    "enableSocialSignIn": true,
    "rememberMeKey": "fb2b171f7741306ae007c05d63194597c661f178",
    "testFrameworks": [
      "gatling"
    ]
  }
}

I am using Chrome Version 47.0.2526.80 (64-bit) on Ubuntu 15.10

titogeorge commented 8 years ago

I regenerated the application with "enableTranslation": true and it is working fine.

jdubois commented 8 years ago

I'm editing the title of your issue, as this is because your have translations not enabled.

jdubois commented 8 years ago

I can't reproduce your issue: I just created a new application with social login and enableTranslation: false, and the application.yml file has all 3 (Google, Facebook, Twitter) configurations. As you don't give your JHipster version, I guess you are using an older version and this has now been fixed.

sdoxsee commented 8 years ago

I have the same issue.

I have only tried Google sign in with translation disabled. After I authorize access to my web app on the google consent screen, i get the error screen above.

2015-12-28 14:45:03.973 DEBUG 13303 --- [nio-8080-exec-6] c.m.myapp.aop.logging.LoggingAspect      : Enter: org.springframework.social.connect.UsersConnectionRepository.findUserIdsWithConnection() with argument[s] = [org.springframework.social.connect.support.OAuth2Connection@e5be2a4]
Hibernate: select socialuser0_.id as id1_4_, socialuser0_.access_token as access_t2_4_, socialuser0_.display_name as display_3_4_, socialuser0_.expire_time as expire_t4_4_, socialuser0_.image_url as image_ur5_4_, socialuser0_.profile_url as profile_6_4_, socialuser0_.provider_id as provider7_4_, socialuser0_.provider_user_id as provider8_4_, socialuser0_.rank as rank9_4_, socialuser0_.refresh_token as refresh10_4_, socialuser0_.secret as secret11_4_, socialuser0_.user_id as user_id12_4_ from jhi_social_user_connection socialuser0_ where socialuser0_.provider_id=? and socialuser0_.provider_user_id=?
2015-12-28 14:45:03.975 DEBUG 13303 --- [nio-8080-exec-6] c.m.myapp.aop.logging.LoggingAspect      : Exit: org.springframework.social.connect.UsersConnectionRepository.findUserIdsWithConnection() with result = []

I'd like to use authentication via Google for my app.

Most recent 2.26.1

{
  "generator-jhipster": {
    "baseName": "lunch",
    "packageName": "com.mycompany.myapp",
    "packageFolder": "com/mycompany/myapp",
    "authenticationType": "session",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": "no",
    "websocket": "no",
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": "elasticsearch",
    "useSass": true,
    "buildTool": "maven",
    "frontendBuilder": "grunt",
    "enableTranslation": false,
    "enableSocialSignIn": true,
    "testFrameworks": [
      "protractor"
    ]
  }
}

N/A

Chrome Version 47.0.2526.106 (64-bit), OSX (10.11.2)

No

No suggestion at this time.

moifort commented 8 years ago

I have reproduced the error I will try to investigate! (Sherlock Holmes mode activated)

titogeorge commented 8 years ago

Thank you all for a Quick fix!!