GithubHelp home page GithubHelp logo

Comments (3)

laosb avatar laosb commented on May 30, 2024

Solution: Update docs to explain it.

from docs.

abernix avatar abernix commented on May 30, 2024

This conflicts with the concept of https://guide.meteor.com/accounts.html#dont-use-profile and #61.

Essentially, don't use profile. Closing, but reopen if you feel differently. ;)

from docs.

MaxPleaner avatar MaxPleaner commented on May 30, 2024

It does already say this in the accounts-multi doc here

The default create user function simply copies options.profile into the new user document. Calling onCreateUser overrides the default hook. This can only be called once.

There are two issues I see:

  1. The main thing which was non-intuitive to me, which is that onCreateUser overwrites instead of acting as a callback. I suppose I am to blame for not reading the docs before using the method, but still, I don't see this behavior being a feature.
  2. The notion that profile should not be used. Reading through the explanation of why it's not a good idea (the default write permission and the fact that people put arbitrary config data there), I see those as good points, but I'm not sure they outweigh the benefits, namely:
    1. the ability to get the username when using a 3rd party service, i.e. accounts-github
    2. the fact that it's intuitive and easily discoverable when poking around the Meteor.user() object

If profile needs manually configured access rules, then perhaps there should be a builtin warning about it. As it stands, though, unless one reads through the doc entry for each method they use (probably a good idea, but uncommon) then they will inevitable have to stumble upon this error in a manner similarly to that of myself: googling "meteor no user profile", reading through an issues thread, then following a link to the docs.

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.