diff --git a/src/components/auth/BaseAuthBody.jsx b/src/components/auth/BaseAuthBody.jsx
index 2c12589..82bcd29 100644
--- a/src/components/auth/BaseAuthBody.jsx
+++ b/src/components/auth/BaseAuthBody.jsx
@@ -18,10 +18,21 @@ export default class BaseAuthBody extends Component {
payload: PropTypes.object
})]),
scopes: PropTypes.array
- }),
+ }).isRequired,
user: userShape
};
+ componentWillReceiveProps(nextProps, nextContext) {
+ // TODO: we must not access Form#fields. This is a temporary
+ // solution to reset Captcha, when the form does not handle errors
+ if (nextContext.auth.error
+ && this.form.fields.captcha
+ && nextContext.auth.error !== this.context.auth.error
+ ) {
+ this.form.fields.captcha.reset();
+ }
+ }
+
renderErrors() {
return this.context.auth.error
?
diff --git a/src/components/auth/PanelTransition.jsx b/src/components/auth/PanelTransition.jsx
index e2e122e..55bc198 100644
--- a/src/components/auth/PanelTransition.jsx
+++ b/src/components/auth/PanelTransition.jsx
@@ -241,12 +241,12 @@ class PanelTransition extends Component {
willLeave = (config) => this.getTransitionStyles(config, {isLeave: true});
/**
- * @param {Object} config
- * @param {string} config.key
- * @param {Object} [options]
- * @param {Object} [options.isLeave=false] - true, if this is a leave transition
+ * @param {object} config
+ * @param {string} config.key
+ * @param {object} [options]
+ * @param {object} [options.isLeave=false] - true, if this is a leave transition
*
- * @return {Object}
+ * @return {object}
*/
getTransitionStyles({key}, options = {}) {
const {isLeave = false} = options;
@@ -298,7 +298,7 @@ class PanelTransition extends Component {
/**
* Tries to auto focus form fields after transition end
*
- * @param {number} length number of panels transitioned
+ * @param {number} length number of panels transitioned
*/
tryToAutoFocus(length) {
if (!this.body) {
@@ -337,7 +337,11 @@ class PanelTransition extends Component {
};
const backButton = (
-