Example #1
0
var isConfigured: boolean = Accounts.loginServicesConfigured();
Accounts.onPageLoadLogin(function () {
    // do something
});

// Covers this PR:  https://github.com/DefinitelyTyped/DefinitelyTyped/pull/8065
var loginOpts = {
    requestPermissions: ["a", "b"],
    requestOfflineToken: true,
    loginUrlParameters: { asdf: 1, qwer: "1234" },
    loginHint: "Help me",
    loginStyle: "Bold and powerful",
    redirectUrl: "popup",
    profile: "asdfasdf"
} as Meteor.LoginWithExternalServiceOptions;
Meteor.loginWithMeteorDeveloperAccount(loginOpts, function (error: Meteor.Error) { });

Accounts.emailTemplates.siteName = "AwesomeSite";
Accounts.emailTemplates.from = "AwesomeSite Admin <*****@*****.**>";
Accounts.emailTemplates.headers = { asdf: 'asdf', qwer: 'qwer' };

Accounts.emailTemplates.enrollAccount.subject = function (user: Meteor.User) {
    return "Welcome to Awesome Town, " + user.profile.name;
};
Accounts.emailTemplates.enrollAccount.html = function (user: Meteor.User, url: string) {
    return "<h1>Some html here</h1>";
};
Accounts.emailTemplates.enrollAccount.from = function () {
    return "*****@*****.**";
};
Accounts.emailTemplates.enrollAccount.text = function (user: Meteor.User, url: string) {