Unable to reload limit rate
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- go
- Domain
- authentication, backend
Research direction
Start by tracing the Auth hot-reload path and the limiterOpts initialization described in the report, then reproduce the issue with a hot_reload/aaaa.env file containing GOTRUE_RATE_LIMIT_EMAIL_SENT. Done means reloading the file updates api.limiterOpts and the Email limit reflects the new value.
Written by the indexing model from the issue text.
Description
Bug report
When using the Supabase local development environment, I am utilizing the Auth "reload" feature (with the hot_reload directory being watched).I added a new environment file named aaaa.env containing the following configuration: GOTRUE_RATE_LIMIT_EMAIL_SENT="200000000". Although the logs indicate that the project successfully detected and read the aaaa.env file, the api.limiterOpts remains unchanged. In other words, the GOTRUE_RATE_LIMIT_EMAIL_SENT setting failed to take effect after the reload.
Describe the bug
Upon reviewing the source code, I discovered that the previous limiterOpts were already set via the following loop: for _, o := range opt { o.apply(api) }.
Because of this, api.limiterOpts is no longer null, which prevents the new configuration values from being assigned or updated.
To Reproduce
1、Create a directory named hot_reload.
2、Start the Auth service in debug mode, setting the watch_dir to the hot_reload directory.
3、Create a file named aaaa.env inside the hot_reload directory with the content: GOTRUE_RATE_LIMIT_EMAIL_SENT="200000000".
4、Observe the Email value within api.limiterOpts to check if it has been updated to reflect the new environment variable.
Expected behavior
Screenshots
System information
- OS: 26.0 (25A8353)
Additional context
Do I need to fix this bug?
- Dominant language
- Go
- Stars
- 2.6k
- Forks
- 764
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 39
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/auth
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100