Code Monkey home page Code Monkey logo

accounts-react's People

Contributors

bolaum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

accounts-react's Issues

Incorrect styled package names in readme

I was unable to install meteoreact:semantic-ui as it's called in the readme, but meteor add meteoreact:accounts-semantic worked. I noticed that meteoreact:unstyled-ui should also be renamed to meteoreact:accounts-unstyled.

showResendVerificationLink functionality

Hi,
I have happily started using this great package, helping us to fully embrace react in the meteor world. Many thanks for creating and sharing it!
What puzzles me ist the missing resend verification link. I can`t find it anywhere.
Could you please tell me in which use-case it should be displayed? TIA

Routing does not work

I'm struggling with the ReactRouter integration. It works fine for normal <Link>s, so the router seems to be setup correctly. However, routing does not work in combination with the accounts components.

For instance, if the user logs in, nothing visible happens; the login dialog is still visible. However, if I reload the page, the root route is being shown. If I call Meteor.logout(), the user is being logged out, but the login dialog does not show up. Only if I reload the page, the login dialog will be rendered.

What may be wrong here? I'm using the latest version of ReactRouter, v4.

change-password empty page

Hi,

I tested the package with this code :

import React, { Component } from 'react'
import { Redirect } from 'react-router'
import { Route, Switch } from 'react-router-dom'
import { AccountsReactComponent } from 'meteor/meteoreact:accounts'


class Authentication extends Component {

  render () {
	const arState = this.arState

	return (
	  <Switch>
		<Route exact path='/sign-in'          component={arState} />
		<Route exact path='/sign-up'          component={arState} />
		<Route exact path='/forgot-password'  component={arState} />
		<Route exact path='/change-password'  component={arState} />
		<Route exact path='/reset-password/:token' component={arState} />
		<Route exact path='/resend-verification'   component={arState} />
	  </Switch>
	)
  }

  arState = ({ match, history }) => {
	const { path, params } = match

	// Cant change password if not logged in.
	if (Meteor.userId() && path !== '/change-password') {
	  return (<Redirect to='/' />)
	}

	return (
	  <AccountsReactComponent
		history={history}
		route={path}
		token={params.token} // for the reset-password route
	  />
	)
  }
}

export default Authentication

I tired to log in and sign up, but when I go to the url /change-password, it does not show anything. Do I miss something ?

AccountsReactComponent does not route to /reset-password as token is in path

In the given example

return (
      <AccountsReactComponent
        history={history}
        route={path}
        token={params.token} // for the reset-password route
      />
    )

when path is '/reset-password/:token', it does not route accordindly as it is not one of the valid state
this allows to get rid of /:token

route={path.indexOf('/reset-password') !== -1 ? '/reset-password' : path}

Maybe you can change AccountsReactComponent (not easy on first look) or just update the example ?

Also I noticed that it is not mentionned to add this code on server side

import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';

Accounts.urls.resetPassword = function (token) {
  return Meteor.absoluteUrl('reset-password/' + token);
};

Update dependency to react-meteor-data

I know this package is not maintained anymore, but I'd like to suggest a minor change: updating (or removing) the hard dependency on [email protected]:

https://forums.meteor.com/t/reactmeteorcomponent-and-react-16-11/51505/5

Reason: Recent React versions have renamed some of the lifecycle hooks an throw warnings on the console. [email protected] fixes this. That's the only diff between 0.2.16 and 1.0.0. But due to the hard dependency of this accounts package on the 0.2.16, I can't update.

Is there any chance to either set the dependency to 1.0.0 or completely remove the version number?

Example?

It's very difficult to use this package without a clear example repo of this working. I'm having a hard time getting this set up at all. It seems that whenever the button is clicked in the form, it refreshes the page.

Warning: React.createElement: type is invalid

Hi, I'm trying to get this package to work with a simple app I'm making.
So far, I've run the install commands:
meteor add meteoreact:accounts meteor add meteoreact:accounts-semantic

Here are relevent snippets of code I'm using:
import AccountsReactComponent from 'meteor/meteoreact:accounts-semantic' ... <AccountsReactComponent state='signUp' />

Here is the full error message I'm getting:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of 'NavbarA'. in NavbarA (created by App)

I'm trying to get a Modal popup (using React-Bootstrap) to display the sign-up page from this package.

Does not forward on successful registration

I'm still having troubles setting routing up correctly.

If the user successfully logs in or out, there is no automatic forward to another page. I managed to workaround this for logins by setting the onLoginHook.

However, there is no equivalent onRegisterHook.

So, I am scratching my head how I can automatically forward the user in this case?

Edit fields functionality

This functionality should help solve a scenario where you want to use one of the default fields but to change one of its properties.

I was thinking on a direction of providing the ability to edit the field's array directly.
Another possibility is to take advantage of deepmerge's arrayMerge option and provide a simple algorithm that will merge arrays in a way the we can do something like

AccountsReact.editFields('signUp', [
  {
     _id: 'password',
     maxLength: 72
  }
])

Username instead of email for login?

Thanks for this package. I'm trying to figure out how I can setup the accounts system so the username can be used instead of the e-mail for login? I couldn't find a way to do this.

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.