google login init
This commit is contained in:
@@ -82,10 +82,9 @@ public class SsoController {
|
||||
}
|
||||
|
||||
@GetMapping(value = "/login/success")
|
||||
@ResponseBody
|
||||
public String loginComplete(@SocialUser User user) {
|
||||
System.out.println(user);
|
||||
return "kkkkkkkkk";
|
||||
return "redirect:/user";
|
||||
}
|
||||
|
||||
// @GetMapping(value = "/login/success")
|
||||
|
||||
@@ -86,6 +86,7 @@ public class UserArgumentResolver implements HandlerMethodArgumentResolver {
|
||||
*/
|
||||
private User convertUser(String authority, Map<String, Object> map) {
|
||||
if (SocialType.FACEBOOK.getVaule().equals(authority)) return getModernUser(SocialType.FACEBOOK, map);
|
||||
else if (SocialType.GOOGLE.getVaule().equals(authority)) return getModernUser(SocialType.GOOGLE, map);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,11 @@ spring.jpa.show-sql=true
|
||||
|
||||
spring.security.oauth2.client.registration.facebook.client-id=715358882216622
|
||||
spring.security.oauth2.client.registration.facebook.client-secret=a39d8f1e06e8c3863d12e8461f4991e8
|
||||
|
||||
spring.security.oauth2.client.registration.google.client-id=534360107417-qhkkasmnj4tml8iuk3v1dh72ipjvf2qp.apps.googleusercontent.com
|
||||
spring.security.oauth2.client.registration.google.client-secret=XkmQ3KPTpmTkWb8X6_1WRR5i
|
||||
|
||||
|
||||
#facebook.client.access-token-uri=https://graph.facebook.com/oauth/access_token
|
||||
#facebook.client.user-authorization-uri=https://www.facebook.com/dialog/oauth
|
||||
#facebook.client.token-name=oauth_token
|
||||
|
||||
@@ -20,5 +20,9 @@
|
||||
<div>
|
||||
<a class="facebook-login-text" href="/mk-auth/oauth2/authorization/facebook">facebook으로 로그인</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a class="facebook-login-text" href="/mk-auth/oauth2/authorization/google">facebook으로 로그인</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user