This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 98
98
99
99
vm . socialRegister = function ( provider ) {
100
100
TcAuthService . socialRegistration ( provider , null )
101
- . then ( function ( socialData ) {
102
- vm . socialUserId = socialData . socialUserId ;
103
- vm . username = socialData . username ;
104
- vm . firstname = socialData . firstname ;
105
- vm . lastname = socialData . lastname ;
106
- vm . email = socialData . email ;
107
- vm . isSocialRegistration = true ;
108
- vm . socialProfile = socialData . socialProfile ;
109
- vm . socialProvider = socialData . socialProvider ;
110
- vm . socialContext . accessToken = socialData . socialaccessToken ;
101
+ . then ( function ( resp ) {
102
+ if ( resp . status === 'SUCCESS' ) {
103
+ var socialData = resp . data ;
104
+ vm . socialUserId = socialData . socialUserId ;
105
+ vm . username = socialData . username ;
106
+ vm . firstname = socialData . firstname ;
107
+ vm . lastname = socialData . lastname ;
108
+ vm . email = socialData . email ;
109
+ vm . socialProfile = socialData . socialProfile ;
110
+ vm . socialProvider = socialData . socialProvider ;
111
+ vm . socialContext = { 'accessToken' : socialData . accessToken } ;
112
+ vm . isSocialRegistration = true ;
113
+ } else {
114
+ vm . isSocialRegistration = false ;
115
+ }
111
116
} )
112
117
. catch ( function ( result ) {
113
118
switch ( result . status ) {
Original file line number Diff line number Diff line change 154
154
} else {
155
155
$log . error ( 'Unsupported social login provider: ' + provider ) ;
156
156
reject ( {
157
- status : "failed " ,
157
+ status : "FAILED " ,
158
158
"error" : "Unsupported social login provider '" + provider + "'"
159
159
} ) ;
160
160
}
You can’t perform that action at this time.
0 commit comments