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

Commit 96842f2

Browse files
author
vikasrohit
committed
SUP-2095, [Edit Profile] Implement linking/unlinking Bitbucket account
-- Enabled bitbucket, but need to check for refresh token with OAuth1
1 parent 7ccf729 commit 96842f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/directives/external-account/external-account.directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{ provider: "behance", className: "fa-behance", displayName: "Behance", disabled: true, order: 2, colorClass: 'el-behance'},
88
// { provider: "google-oauth2", className: "fa-google-plus", displayName: "Google+", disabled: true, order: }, colorClass: 'el-dribble',
99
{ provider: "github", className: "fa-github", displayName: "Github", disabled: false, order: 1, colorClass: 'el-github'},
10-
{ provider: "bitbucket", className: "fa-bitbucket", displayName: "Bitbucket", disabled: true, order: 7, colorClass: 'el-bitbucket'},
10+
{ provider: "bitbucket", className: "fa-bitbucket", displayName: "Bitbucket", disabled: false, order: 7, colorClass: 'el-bitbucket'},
1111
{ provider: "twitter", className: "fa-twitter", displayName: "Twitter", disabled: true, order: 4, colorClass: 'el-twitter'},
1212
{ provider: "weblinks", className: "fa-globe", displayName: "Web Links", disabled: true, order: 8, colorClass: 'el-weblinks'}
1313
// TODO add more

app/services/helpers.service.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
socialProviderId = '';
3838

3939
var socialUserId = profile.user_id.substring(profile.user_id.lastIndexOf('|') + 1);
40+
var refreshToken = null;
4041

4142
if (socialProvider === 'google-oauth2') {
4243
firstName = profile.given_name;
@@ -90,6 +91,7 @@
9091
var token = accessToken;
9192
if (profile.identities && profile.identities.length > 0) {
9293
token = profile.identities[0].access_token;
94+
console.log(profile.identities[0]);
9395
}
9496
return {
9597
socialUserId: socialUserId,
@@ -99,7 +101,8 @@
99101
email: email,
100102
socialProfile: profile,
101103
socialProvider: socialProvider,
102-
accessToken: token
104+
accessToken: token,
105+
refreshToken: refreshToken
103106
}
104107
}
105108

0 commit comments

Comments
 (0)