meteor-accounts-ui-bootstrap-3 icon indicating copy to clipboard operation
meteor-accounts-ui-bootstrap-3 copied to clipboard

How do I access setCustomSignupOptions from onCreateUser

Open tewksbum opened this issue 9 years ago • 2 comments

The use case that is laid out is EXACTLY what I want do. What I've done is, put this in the client/startup.js:

accountsUIBootstrap3.setCustomSignupOptions = function() { return { mxpDistinctId: Session.get('mxpdid'), leadSource: Session.get('leadSource') } };

Then on the server, within onCreateUser I've tried:

console.log(options) - just has profile.name console.log(options.leadSource) = undefined console.log(options.mxpDistinctId) = undefined

What am I missing? Does the function need to be explicitly called somewhere? Am I using the wrong object within OnCreateUser?

Sorry - so close - yet so far!

tewksbum avatar Jan 28 '16 03:01 tewksbum

And clarification - I'm really looking to accomplish this w/ service logins Facebook / Google. I see that it does work for password accounts.

tewksbum avatar Jan 28 '16 03:01 tewksbum

well... if this is of interest to anyone... what I did was update a ServerSession package so params can be grabbed client side and used on Server: https://github.com/tewksbum/meteor-server-session

tewksbum avatar Jan 29 '16 02:01 tewksbum