• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / auth / 11324523960
69%

Build:
DEFAULT BRANCH: master
Ran 14 Oct 2024 09:20AM UTC
Jobs 1
Files 131
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Oct 2024 09:14AM UTC coverage: 57.585% (-0.01%) from 57.595%
11324523960

push

github

web-flow
feat: configurable email and sms rate limiting (#1800)

Adds two new configuration values for rate limiting the sending of
emails and sms messages:

 - GOTRUE_RATE_LIMIT_EMAIL_SENT
 - GOTRUE_RATE_LIMIT_SMS_SENT

It is implemented with a simple rate limiter that resets a counter at a
regular interval. The first intervals start time is set when the counter
is initialized. It will be reset when the server is restarted, but
preserved when the config is reloaded.

Syntax examples:
```
1.5       # Allow 1.5 events over 1 hour (legacy format)
100       # Allow 100 events over 1 hour (1h is default)
100/1h    # Allow 100 events over 1 hour (explicit duration)
100/24h   # Allow 100 events over 24 hours
100/72h   # Allow 100 events over 72 hours (use hours for days)
10/30m    # Allow 10  events over 30 minutes
3/10s     # Allow 3   events over 10 seconds
```

Syntax in ABNF to express the format as value:
```
value = count / rate
count = 1*DIGIT ["." 1*DIGIT]
rate = 1*DIGIT "/" ival
ival = ival-sec / ival-min / ival-hr
ival-sec = 1*DIGIT "s"
ival-min = 1*DIGIT "s"
ival-hr = 1*DIGIT "h"
```

This change was a continuation of
https://github.com/supabase/auth/pull/1746 adapted to support the recent
preservation of rate limiters across server reloads.

---------

Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>

61 of 75 new or added lines in 6 files covered. (81.33%)

5 existing lines in 3 files now uncovered.

9509 of 16513 relevant lines covered (57.58%)

55.84 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
81.51
-0.45% internal/api/phone.go
6
57.4
-0.09% internal/api/mail.go
7
78.13
internal/conf/rate.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
81.51
-0.45% internal/api/phone.go
1
57.4
-0.09% internal/api/mail.go
3
75.63
-1.52% internal/models/sessions.go
Jobs
ID Job ID Ran Files Coverage
1 11324523960.1 14 Oct 2024 09:20AM UTC 131
57.58
GitHub Action Run
Source Files on build 11324523960
  • Tree
  • List 131
  • Changed 18
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5e940471 on github
  • Prev Build on master (#11293796950)
  • Next Build on master (#11327024141)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc