storyteller:accounts-react-materialize

v0.1.1Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

A simple package with Materialize themed user components for React.

You can include them where you want and build the page according to your wishes. You can add any Materialize package you like. There is no constraint on that in this package.

NOT FOR PRODUCTION

For full functionality inclide storyteller:accounts-server

Components:

<UserLogin />

<UserRegister />

<UserSettings /> Contains the following:

  • <UserChangeUsernane />
  • <UserEmail />
  • <UserChangePassword />

Note:

Login and registration are full page components

Some defaults:

  • After login and registration the components redirect to path named "Dashboard"
  • The login and registration page need to be named "Login" and "Register" respectively for easy transition between those two forms.

Sample routes:

1FlowRouter.route("/", {
2  name: "Dashboard",
3  action: function() {
4    ReactLayout.render(MainLayout, {content: <Dashboard />});
5  }
6});
7
8//user login
9FlowRouter.route("/login", {
10  name: "Login",
11  action: function(){
12    ReactLayout.render(MainLayout, {content: <UserLogin />});
13  }
14});
15
16//user registration
17FlowRouter.route("/register", {
18  name: "Register",
19  action: function(){
20    ReactLayout.render(MainLayout, {content: <UserRegister />});
21  }
22});
23
24//user settings
25FlowRouter.route("/user/settings", {
26  name: "user-settings",
27  action: function(){
28    ReactLayout.render(MainLayout, {content: <UserSettings />});
29  }
30});

TODO:

  • Popup (modal) + dropdown login form component
  • Better error reporting on forms
  • Tests
  • Third-party OAuth logins, registration and merger of accounts
  • Reset password flow
  • Confirmation e-mail
  • Easy way to edit defaults via settings file or something
  • i18n