storyteller:accounts-react-materialize

v0.1.4Published 5 years ago

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

Code ClimateTest CoverageIssue Count

accounts-react-materialize

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 include 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 user is redirected to path named "dashboard"
  • The login and registration paths need to be named "login" and "register"

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