-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Work with Meteor release 0.8.2 - Update example code - Update README
- Loading branch information
Showing
15 changed files
with
79 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.8.1.3 | ||
0.8.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
<head> | ||
<title>tett</title> | ||
<title>Link Account example</title> | ||
</head> | ||
|
||
<body> | ||
<div> | ||
<h2>1. Log in with a non Github service through login button</h2> | ||
{{> loginButtons}} | ||
Use twitter account to login. | ||
</div> | ||
|
||
<div> | ||
|
||
{{> linkTemplate}} | ||
</div> | ||
</body> | ||
|
||
<template name="linkTemplate"> | ||
List of connected services. | ||
<h2>2. Link Github account</h2> | ||
|
||
<button class="link-github">Link Github Account</button> | ||
|
||
<h2>3. List out services that are associated with current user.</h2> | ||
|
||
<ul> | ||
{{#each services}} | ||
<li>{{this}}</li> | ||
{{/each}} | ||
</ul> | ||
|
||
<button class="link-github">Link Github Account</button> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
if (Meteor.isClient) { | ||
Meteor.linkWithFacebook = function (options, callback) { | ||
if (!Meteor.userId()) { | ||
throw new Meteor.Error(402, 'Please login to an existing account before link.'); | ||
} | ||
|
||
if (! callback && typeof options === "function") { | ||
callback = options; | ||
options = null; | ||
} | ||
|
||
var credentialRequestCompleteCallback = Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
Facebook.requestCredential(credentialRequestCompleteCallback); | ||
var credentialRequestCompleteCallback = | ||
Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
Facebook.requestCredential(options, credentialRequestCompleteCallback); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
if (Meteor.isClient) { | ||
Meteor.linkWithGithub = function (options, callback) { | ||
if (!Meteor.userId()) { | ||
throw new Meteor.Error(402, 'Please login to an existing account before link.'); | ||
} | ||
|
||
if (! callback && typeof options === "function") { | ||
callback = options; | ||
options = null; | ||
} | ||
|
||
var credentialRequestCompleteCallback = Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
Github.requestCredential(credentialRequestCompleteCallback); | ||
Github.requestCredential(options, credentialRequestCompleteCallback); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
if (Meteor.isClient) { | ||
Meteor.linkWithGoogle = function (options, callback) { | ||
if (!Meteor.userId()) { | ||
throw new Meteor.Error(402, 'Please login to an existing account before link.'); | ||
} | ||
|
||
if (! callback && typeof options === "function") { | ||
callback = options; | ||
options = null; | ||
} | ||
|
||
var credentialRequestCompleteCallback = Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
Google.requestCredential(credentialRequestCompleteCallback); | ||
Google.requestCredential(options, credentialRequestCompleteCallback); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
if (Meteor.isClient) { | ||
Meteor.linkWithMeetup = function (options, callback) { | ||
if (!Meteor.userId()) { | ||
throw new Meteor.Error(402, 'Please login to an existing account before link.'); | ||
} | ||
|
||
if (! callback && typeof options === "function") { | ||
callback = options; | ||
options = null; | ||
} | ||
|
||
var credentialRequestCompleteCallback = Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
Meetup.requestCredential(credentialRequestCompleteCallback); | ||
Meetup.requestCredential(options, credentialRequestCompleteCallback); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
if (Meteor.isClient) { | ||
Meteor.linkWithMeteorDeveloperAccount = function (options, callback) { | ||
if (!Meteor.userId()) { | ||
throw new Meteor.Error(402, 'Please login to an existing account before link.'); | ||
} | ||
|
||
if (! callback && typeof options === "function") { | ||
callback = options; | ||
options = null; | ||
} | ||
|
||
var credentialRequestCompleteCallback = Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
MeteorDeveloperAccounts.requestCredential(credentialRequestCompleteCallback); | ||
var credentialRequestCompleteCallback = | ||
Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
MeteorDeveloperAccounts.requestCredential(options, credentialRequestCompleteCallback); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
"description": "Link social network accounts to existing Meteor user.", | ||
"homepage": "https://github.com/yubozhao/meteor-link-accounts", | ||
"author": "Bozhao Yu <[email protected]>", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"git": "https://github.com/yubozhao/meteor-link-accounts.git" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
if (Meteor.isClient) { | ||
Meteor.linkWithTwitter = function (options, callback) { | ||
if (!Meteor.userId()) { | ||
throw new Meteor.Error(402, 'Please login to an existing account before link.'); | ||
} | ||
|
||
if (! callback && typeof options === "function") { | ||
callback = options; | ||
options = null; | ||
} | ||
|
||
var credentialRequestCompleteCallback = Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
Twitter.requestCredential(credentialRequestCompleteCallback); | ||
Twitter.requestCredential(options, credentialRequestCompleteCallback); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
if (Meteor.isClient) { | ||
Meteor.linkWithWeibo = function (options, callback) { | ||
if (!Meteor.userId()) { | ||
throw new Meteor.Error(402, 'Please login to an existing account before link.'); | ||
} | ||
|
||
if (! callback && typeof options === "function") { | ||
callback = options; | ||
options = null; | ||
} | ||
|
||
var credentialRequestCompleteCallback = Accounts.oauth.linkCredentialRequestCompleteHandler(callback); | ||
Weibo.requestCredential(credentialRequestCompleteCallback); | ||
Weibo.requestCredential(options, credentialRequestCompleteCallback); | ||
}; | ||
} |