auth
auth copied to clipboard
fix: define search path in auth functions
What kind of change does this PR introduce?
- Revert https://github.com/supabase/auth/pull/1634
- Also, updates the definition of the
auth.uid()andauth.role()function to account for the change in postgres 14, which made this impossible:current_setting(request.jwt.claim.my-claim, true)(thus always returning null), so we need to also includecurrent_setting('request.jwt.claims', true), '')::jsonb ->> 'sub'(note the s in claims)
Also @kangmingtay can we run an inspection script to see if people have changed grants on these functions. If we do create or replace AFAIK the grants are gone and it may break something in those customer projects.
Pull Request Test Coverage Report for Build 9659049953
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 57.674%
| Totals | |
|---|---|
| Change from base Build 9648353678: | 0.0% |
| Covered Lines: | 8699 |
| Relevant Lines: | 15083 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 9659133962
Details
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 57.674%
| Totals | |
|---|---|
| Change from base Build 9648353678: | 0.0% |
| Covered Lines: | 8699 |
| Relevant Lines: | 15083 |
💛 - Coveralls
@kangmingtay is this something we still want to do, or can we close it?