meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

#20 Adding Google OAuth #217

Closed NickBusey closed 7 years ago

NickBusey commented 7 years ago

This enables Google OAuth. The button isn't really styled so it's just kinda red, but it all works fine.

hwillson commented 7 years ago

Hi @NickBusey - sorry for the delay in responding to this. Are you still interested in working on this? If so, could you rebase your PR to get the latest changes from master? I'll then review - thanks!

NickBusey commented 7 years ago

@hwillson sure

abernix commented 7 years ago

@NickBusey Did you ever get a chance to consider rebasing this?

NickBusey commented 7 years ago

@abernix I tried, but it looks like there is a bug with the new service-configuration package version. It should be just two things, running meteor add accounts-ui accounts-google service-configuration and changing app-body.js:emailLocalPart() to:

  displayName() {
    let displayName = '';
    if (Meteor.user().emails) {
      const email = Meteor.user().emails[0].address;
      displayName = email.substring(0, email.indexOf('@'));
    } else {
      displayName = Meteor.user().profile.name;
    }
    return displayName;
  },

I don't have any more time to dedicate to this PR though. Best of luck.