Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

fixing social registration problem #450

Merged
merged 1 commit into from
Oct 26, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions app/account/register/register.controller.js
Original file line number Diff line number Diff line change
@@ -98,16 +98,21 @@

vm.socialRegister = function(provider) {
TcAuthService.socialRegistration(provider, null)
.then(function(socialData) {
vm.socialUserId = socialData.socialUserId;
vm.username = socialData.username;
vm.firstname = socialData.firstname;
vm.lastname = socialData.lastname;
vm.email = socialData.email;
vm.isSocialRegistration = true;
vm.socialProfile = socialData.socialProfile;
vm.socialProvider = socialData.socialProvider;
vm.socialContext.accessToken = socialData.socialaccessToken;
.then(function(resp) {
if (resp.status === 'SUCCESS') {
var socialData = resp.data;
vm.socialUserId = socialData.socialUserId;
vm.username = socialData.username;
vm.firstname = socialData.firstname;
vm.lastname = socialData.lastname;
vm.email = socialData.email;
vm.socialProfile = socialData.socialProfile;
vm.socialProvider = socialData.socialProvider;
vm.socialContext= {'accessToken': socialData.accessToken};
vm.isSocialRegistration = true;
} else {
vm.isSocialRegistration = false;
}
})
.catch(function(result) {
switch (result.status) {
2 changes: 1 addition & 1 deletion app/services/tcAuth.service.js
Original file line number Diff line number Diff line change
@@ -154,7 +154,7 @@
} else {
$log.error('Unsupported social login provider: ' + provider);
reject({
status: "failed",
status: "FAILED",
"error": "Unsupported social login provider '" + provider + "'"
});
}