File tree 4 files changed +26
-10
lines changed
4 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,11 @@ public void ConfigureAuth(IAppBuilder app)
63
63
appId : "429380533932654" ,
64
64
appSecret : "ce6476f6a182519fee61ee17db94556d" ) ;
65
65
66
- // app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
67
- // {
68
- // ClientId = "",
69
- // ClientSecret = ""
70
- // });
66
+ app . UseGoogleAuthentication ( new GoogleOAuth2AuthenticationOptions ( )
67
+ {
68
+ ClientId = "444754422502-l5urcdutcrgoedvdtrrbbvml2boq6eg2.apps.googleusercontent.com " ,
69
+ ClientSecret = "mzj_gvPmB-pkCca_6U1VLkBE "
70
+ } ) ;
71
71
}
72
72
}
73
73
}
Original file line number Diff line number Diff line change 2
2
$scope . name = tokenService . getUserName ( ) ;
3
3
4
4
$http ( {
5
- url : 'api/Account/ExternalLogin ' ,
5
+ url : '/ api/Account/ExternalLogins?returnUrl=%2F&generateState=true ' ,
6
6
method : 'GET'
7
7
} ) . then ( function successCallback ( response ) {
8
- console . log ( response . data ) ;
9
- $scope . users = response . data ;
8
+ angular . forEach ( response . data , function ( value , key ) {
9
+ console . log ( value ) ;
10
+ } ) ;
10
11
} , function errorCallback ( response ) {
11
12
} ) ;
13
+
12
14
} ] ) ;
Original file line number Diff line number Diff line change 2
2
3
3
$scope . user = { mail : '' , password : '' } ;
4
4
$scope . hasError = false ;
5
+ $http ( {
6
+ url : '/api/Account/ExternalLogins?returnUrl=%2F&generateState=true' ,
7
+ method : 'GET'
8
+ } ) . then ( function successCallback ( response ) {
9
+ $scope . networks = response . data ;
10
+ } , function errorCallback ( response ) {
11
+ } ) ;
12
+
13
+
5
14
$scope . connexion = function ( ) {
6
15
var response = $http ( {
7
16
url : 'api/login' ,
21
30
$scope . user . mail = '' ;
22
31
$scope . user . password = '' ;
23
32
} ) ;
24
-
25
33
} ;
26
34
} ] ) ;
Original file line number Diff line number Diff line change 4
4
}
5
5
<div class =" container " ng-controller =" loginPageController" >
6
6
<div class =" row" >
7
- <div class =" col-md-3 col-lg-offset-4 " >
7
+ <div class =" col-md-3 col-lg-offset-2 " >
8
8
<h1 >Sign in</h1 >
9
9
<form ng-submit =" connexion()" >
10
10
<div class =" form-group" ng-class =" { 'has-error': hasError}" >
17
17
<input type =" submit" id =" submit" value =" Sign in" class =" btn btn-primary" />
18
18
</form >
19
19
</div >
20
+ <div ng-cloak class =" col-md-4 col-lg-offset-1" >
21
+ <h3 >Or use a social network</h3 >
22
+ <a ng-repeat =" (key, value) in networks" href =" {{value.Url}}" >
23
+ <input type =" button" value =" {{value.Name}}" class =" btn" />
24
+ </a >
25
+ </div >
20
26
</div >
21
27
</div >
22
28
<script src =" http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js" ></script >
You can’t perform that action at this time.
0 commit comments