Adding roles to accounts-twitter

So I’m trying to add alanning:meteor-roles to a Meteor app I’m building, and the problem I’m encountering is that I want to add roles to accounts-twitter signups. I’m making a custom UI for it (so not using accounts-ui) and basically just calling Meteor.loginWithTwitter() to signup / login users.

How do I go about assigning roles to newly created users? I’ve tried working with Accounts.onCreateUser() and Accounts.onLogin() but the cursor I’m getting from Meteor.loginWithTwitter() seems to just return ‘undefined’.

How can I assign a default role to all Twitter signups for instance?

1 Like