I have a problem displaying the standard Meteor user accounts login template {{> atForm }} in my React based Meteor application.
I am using a wrapper component to display Blaze based templates in my React application. I am trying to implement the standard login form of Meteors useraccounts package. But when I am using {{> atForm }} in the Blaze Template the login form is not displayed. But when I lock a specific state like {{> atForm state='signUp'}} then the form is displayed.
Wrapper Component
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
export default class AccountsUI extends Component{
componentDidMount() {
this.view = Blaze.render(Template.LoginTemplate,
ReactDOM.findDOMNode(this.container));
}
componentWillUnmount(){
Blaze.remove(this.view);
}
render () {
return <span ref={(ref) => this.container = ref} />
}
}
Blaze Template
<template name="LoginTemplate">
{{> atForm }} //Not displayed
{{> atForm state='signUp'}} // Displayed
</template>
But also other internal states like {{> atForm state='signIn'}} are not displayed as well.
Packages in .meteor
useraccounts:unstyled
accounts-password
Do you have a suggestion why this is the case and how I can resolve this problem ? Thanks in advance.
Answer is solved by myself. The problem was, that I was already logged in when i rewrote my code. So the only thing that was missing was to log out. So if anyone has the same problem, always check if you are already logged in, in your application. If so, be sure to log out, before adding the {{> atForm}} into your template.