Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change-password empty page #14

Open
rfrancois opened this issue Nov 20, 2018 · 1 comment
Open

change-password empty page #14

rfrancois opened this issue Nov 20, 2018 · 1 comment

Comments

@rfrancois
Copy link

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 ?

@opyh
Copy link

opyh commented Mar 4, 2019

I had the same problem. Have a look if the enablePasswordChange option is set to true. It seems in version 1.2.3 this is set to false by default, and 1.2.4 is not published yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants