소스 검색

Step 9.4: Configure accounts-ui to only require username.

Frederic G. MARAND 8 년 전
부모
커밋
c198cee6ff
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      AccountsUIWrapper.jsx
  2. 5 0
      simple-todos-react.jsx

+ 1 - 1
AccountsUIWrapper.jsx

@@ -9,6 +9,6 @@ AccountsUIWrapper = React.createClass({
   },
   render() {
     // Just render a placeholder container that will be filled in.
-    return <span ref="container" className="AUIW-wrapper" />;
+    return <span ref="container" />;
   }
 });

+ 5 - 0
simple-todos-react.jsx

@@ -2,6 +2,11 @@
 Tasks = new Mongo.Collection('tasks');
 
 if (Meteor.isClient) {
+  // This code is executed on the client only.
+  Accounts.ui.config({
+    passwordSignupFields: "USERNAME_ONLY"
+  });
+
   Meteor.startup(function () {
     // Use this branch to render the component after the page is ready.
     ReactDOM.render(<App />, document.getElementById('render-target'));