-
Notifications
You must be signed in to change notification settings - Fork 80
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
Sign out? #121
Comments
Something doesn't appear to be working - the form should do as you suspect and show the 'profile' information once you are logged in. If you look at the LoginForm.jsx, the following code is run when you successfully login: if (!error) {
Meteor.loginWithPassword(loginSelector, password, (error, result) => {
onSubmitHook(error,formState);
if (error) {
this.showMessage(`error.accounts.${error.reason}` || "unknown_error", 'error');
}
else {
loginResultCallback(() => this.state.onSignedInHook());
this.setState({
formState: STATES.PROFILE,
password: null,
});
this.clearDefaultFieldValues();
}
});
} This sets the state to So then the |
And indeed in the if (user && formState == STATES.PROFILE) {
loginButtons.push({
id: 'signOut',
label: this.translate('signOut'),
disabled: waiting,
onClick: this.signOut.bind(this)
});
} |
@ianchanning thanks for confirming what I suspected. In the meantime I've moved on to simply using the Meteor-provided accounts functions to let users sign up / sign in / log out, which I built into forms / buttons of my own making. It seems a more robust approach anyway and you have more control. Of course, if this package would work it could make building mock-ups a lot faster. |
I've essentially worked around the problem by using NavBar buttons instead. From what I can tell #117 appears to be a related bug and the PR for that looks promising. |
This is probably a very basic question, but it's not mentioned in the doc how a logout button can be added.
When using Meteor's accounts, after logging in, the log out button is automatically displayed.
I tried several things but couldn't figure out how to display it. Help much appreciated!
The text was updated successfully, but these errors were encountered: