mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #1297 from sharelatex/ja-rate-limit-v2-login
Add rate limit to v2 login end point GitOrigin-RevId: 81b14387e4a6381f4c0eae17e43af84b2af7fea5
This commit is contained in:
parent
b0b87a7b6e
commit
d2465f8d6a
1 changed files with 8 additions and 2 deletions
|
@ -115,6 +115,12 @@ define(['base', 'libs/passfield'], function(App) {
|
|||
'Session error. Please check you have cookies enabled. If the problem persists, try clearing your cache and cookies.',
|
||||
type: 'error'
|
||||
}
|
||||
} else if (status === 429) {
|
||||
response.message = {
|
||||
text:
|
||||
'Too many attempts. Please wait for a while and try again.',
|
||||
type: 'error'
|
||||
}
|
||||
} else {
|
||||
response.message = {
|
||||
text:
|
||||
|
@ -146,8 +152,8 @@ define(['base', 'libs/passfield'], function(App) {
|
|||
restrict: 'E',
|
||||
template: `\
|
||||
<div class="alert" ng-class="{
|
||||
'alert-danger': form.response.message.type == 'error',
|
||||
'alert-success': form.response.message.type != 'error'
|
||||
'alert-danger': form.response.message.type == 'error',
|
||||
'alert-success': form.response.message.type != 'error'
|
||||
}" ng-show="!!form.response.message" ng-bind-html="form.response.message.text">
|
||||
</div>
|
||||
<div ng-transclude></div>\
|
||||
|
|
Loading…
Reference in a new issue