mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #73 from rschamp/feature/login-captcha-redirect
Redirect to CAPTCHA when too many login attempts fail
This commit is contained in:
commit
dae7288395
2 changed files with 4 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
"/csrf_token/",
|
||||
"/fragment/",
|
||||
"/get_image/",
|
||||
"/login_retry",
|
||||
"/session/",
|
||||
"/static/"
|
||||
]
|
||||
|
|
|
@ -77,6 +77,9 @@ var Navigation = React.createClass({
|
|||
if (body) {
|
||||
body = body[0];
|
||||
if (!body.success) {
|
||||
if (body.redirect) {
|
||||
window.location = body.redirect;
|
||||
}
|
||||
this.setState({'loginError': body.msg});
|
||||
} else {
|
||||
this.closeLogin();
|
||||
|
|
Loading…
Reference in a new issue