Skip to content

fix: enforce email confirmation requirement for sign-ins with unverified emails #1982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 946 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
946 commits
Select commit Hold shift + click to select a range
e4f2b59
feat: refactor generate accesss token to take in request (#1531)
J0 Apr 12, 2024
4f5e8e5
fix: linkedin_oidc provider error (#1534)
omerhochman Apr 15, 2024
58ef4af
fix: revert patch for linkedin_oidc provider error (#1535)
J0 Apr 15, 2024
10d6d8b
fix: update linkedin issuer url (#1536)
kangmingtay Apr 15, 2024
dd4f0e0
chore(master): release 2.149.0 (#1532)
github-actions[bot] Apr 15, 2024
348a1da
feat: allow for postgres and http functions on each extensibility poi…
J0 Apr 15, 2024
91e9eca
fix: return error if session id does not exist (#1538)
kangmingtay Apr 15, 2024
d4d743c
feat: send over user in SendSMS Hook instead of UserID (#1551)
J0 Apr 22, 2024
9594a53
chore(deps): bump golang.org/x/net from 0.21.0 to 0.23.0 (#1545)
dependabot[bot] Apr 22, 2024
1cb4f96
feat: add support for Azure CIAM login (#1541)
hf Apr 23, 2024
bd8b5c4
feat: merge provider metadata on link account (#1552)
hf Apr 23, 2024
f96ff31
feat: add timeout middleware (#1529)
J0 Apr 25, 2024
5bedafc
chore(master): release 2.150.0 (#1537)
github-actions[bot] Apr 25, 2024
2caa7b4
fix: add db conn max idle time setting (#1555)
hf Apr 27, 2024
6ec08b3
ci: add exhaustive switch statement linter (#1557)
hf Apr 28, 2024
374a9c2
chore(master): release 2.150.1 (#1556)
github-actions[bot] Apr 29, 2024
170bd66
fix: log final writer error instead of handling (#1564)
hf Apr 30, 2024
434a59a
fix: format test otps (#1567)
kangmingtay Apr 30, 2024
bfe4d98
fix: do call send sms hook when SMS autoconfirm is enabled (#1562)
J0 May 1, 2024
d1cf8d9
feat: refactor one-time tokens for performance (#1558)
hf May 6, 2024
68e31d9
chore(master): release 2.151.0 (#1565)
github-actions[bot] May 6, 2024
86a79df
feat: update openapi spec with identity and is_anonymous fields (#1573)
J0 May 8, 2024
ed2b490
fix: use api_external_url domain as localname (#1575)
kangmingtay May 8, 2024
e5f98cb
fix: sms verify should update is_anonymous field (#1580)
kangmingtay May 13, 2024
c22fc15
fix: improve logging structure (#1583)
kangmingtay May 16, 2024
c64ae3d
feat: update chi version (#1581)
kangmingtay May 17, 2024
39ca026
feat: remove legacy lookup in users for one_time_tokens (phase II) (#…
hf May 17, 2024
72614a1
feat: new timeout writer implementation (#1584)
hf May 22, 2024
b954a48
chore(master): release 2.152.0 (#1574)
github-actions[bot] May 22, 2024
93f52fc
chore: remove unused args in functions (#1594)
kangmingtay May 30, 2024
6c9fbd4
fix: deadlock issue with timeout middleware write (#1595)
kangmingtay May 30, 2024
0ef7eb3
fix: call write header in write if not written (#1598)
hf May 30, 2024
b352719
feat: add SAML specific external URL config (#1599)
hf May 31, 2024
55409f7
feat: add support for verifying argon2i and argon2id passwords (#1597)
hf May 31, 2024
5262683
fix: improve token OIDC logging (#1606)
kangmingtay Jun 3, 2024
53e223a
feat: make the email client explicity set the format to be HTML (#1149)
mansueli Jun 4, 2024
e3ebffb
chore: bump alpine and go versions (#1607)
kangmingtay Jun 4, 2024
cbcab16
ci: upgrade local dockerfile go version (#1608)
hf Jun 4, 2024
5894d9e
fix: update contributing to use v1.22 (#1609)
J0 Jun 4, 2024
dd16b95
chore(master): release 2.153.0 (#1596)
github-actions[bot] Jun 6, 2024
4f9994b
feat: use largest avatar from spotify instead (#1210)
william-matz Jun 6, 2024
f9c13c0
feat: add max length check for email (#1508)
LashaJini Jun 6, 2024
fa90764
ci: re-format files (#1611)
hf Jun 6, 2024
cdd13ad
feat: upgrade otel to v1.26 (#1585)
J0 Jun 7, 2024
357bda2
fix: define search path in auth functions (#1616)
kangmingtay Jun 12, 2024
e4a4758
feat: encrypt sensitive columns (#1593)
hf Jun 12, 2024
cd7b191
ci: fix doubling of rc version identifier (#1618)
J0 Jun 12, 2024
bb99251
feat: add support for Slack OAuth V2 (#1591)
zhawtof Jun 12, 2024
28967aa
fix: enable rls & update grants for auth tables (#1617)
kangmingtay Jun 12, 2024
3cd00ee
chore(master): release 2.154.0 (#1610)
github-actions[bot] Jun 14, 2024
f5c6fcd
fix: admin user update should update is_anonymous field (#1623)
kangmingtay Jun 17, 2024
06464c0
fix: add ip based limiter (#1622)
kangmingtay Jun 17, 2024
bca0ea7
chore(master): release 2.154.1 (#1624)
github-actions[bot] Jun 20, 2024
930aa3e
fix: publish to ghcr.io/supabase/auth (#1626)
J0 Jun 20, 2024
e81c25d
fix: update MaxFrequency error message to reflect number of seconds (…
J0 Jun 20, 2024
155e87e
fix: revert define search path in auth functions (#1634)
J0 Jun 24, 2024
32afa7e
chore(master): release 2.154.2 (#1628)
github-actions[bot] Jun 24, 2024
d8b47f9
fix: improve mfa verify logs (#1635)
kangmingtay Jun 26, 2024
bbecbd6
fix: use pointer for `user.EncryptedPassword` (#1637)
hf Jun 27, 2024
2cb97f0
fix: upgrade golang-jwt to v5 (#1639)
kangmingtay Jun 27, 2024
97b8f1b
fix: return proper error message when invalid email_change token is …
J0 Jul 2, 2024
3f70d9d
fix: invited users should have a temporary password generated (#1644)
kangmingtay Jul 3, 2024
20d59f1
feat: add `password_hash` and `id` fields to admin create user (#1641)
kangmingtay Jul 3, 2024
85361b7
chore(master): release 2.155.0 (#1640)
github-actions[bot] Jul 3, 2024
3c8d765
fix: return proper error if sms rate limit is exceeded (#1647)
kangmingtay Jul 4, 2024
42c1d45
fix: check for empty aud string (#1649)
kangmingtay Jul 4, 2024
a518505
fix: apply mailer autoconfirm config to update user email (#1646)
kangmingtay Jul 4, 2024
9c88ee5
chore(master): release 2.155.1 (#1648)
github-actions[bot] Jul 4, 2024
33caaa9
chore(deps): bump github.com/rs/cors from 1.9.0 to 1.11.0 (#1650)
dependabot[bot] Jul 5, 2024
10ca9c8
fix: set rate limit log level to warn (#1652)
kangmingtay Jul 11, 2024
4e6ef47
chore: add default tests for saml assertions (#1651)
kangmingtay Jul 11, 2024
bf5381a
fix: omit empty string from name & use case-insensitive equality for …
kangmingtay Jul 12, 2024
5a6793e
fix: improve session error logging (#1655)
kangmingtay Jul 12, 2024
ac61939
chore(master): release 2.155.2 (#1653)
github-actions[bot] Jul 12, 2024
98d8324
fix: serialize jwt as string (#1657)
kangmingtay Jul 12, 2024
9ac3cff
chore(master): release 2.155.3 (#1658)
github-actions[bot] Jul 12, 2024
f99286e
fix: treat empty string as nil in `encrypted_password` (#1663)
hf Jul 17, 2024
04752de
chore(master): release 2.155.4 (#1664)
github-actions[bot] Jul 17, 2024
1858c93
fix: check password max length in checkPasswordStrength (#1659)
kangmingtay Jul 18, 2024
7e67f3e
fix: don't update attribute mapping if nil (#1665)
kangmingtay Jul 18, 2024
822fb93
fix: refactor mfa models and add observability to loadFactor (#1669)
J0 Jul 19, 2024
ad7a770
chore(master): release 2.155.5 (#1666)
github-actions[bot] Jul 19, 2024
8efd57d
fix: use deep equal (#1672)
kangmingtay Jul 22, 2024
25d1447
chore(master): release 2.155.6 (#1673)
github-actions[bot] Jul 22, 2024
b57e223
fix: restrict autoconfirm email change to anonymous users (#1679)
kangmingtay Jul 25, 2024
f9df65c
feat: add is_anonymous claim to Auth hook jsonschema (#1667)
J0 Jul 25, 2024
f0a40c5
chore(master): release 2.156.0 (#1680)
github-actions[bot] Jul 25, 2024
c7a2be3
feat: add asymmetric jwt support (#1674)
kangmingtay Jul 26, 2024
7de0cb3
chore(master): release 2.157.0 (#1683)
github-actions[bot] Jul 26, 2024
46491b8
feat: add hook log entry with `run_hook` action (#1684)
hf Jul 29, 2024
ae091aa
feat: MFA (Phone) (#1668)
J0 Jul 29, 2024
0ad1402
fix: maintain backward compatibility for asymmetric JWTs (#1690)
kangmingtay Jul 29, 2024
6aca52b
fix: minor spelling errors (#1688)
J0 Jul 30, 2024
3d448fa
fix: MFA NewFactor to default to creating unverfied factors (#1692)
J0 Jul 31, 2024
fdff1e7
fix: update mfa phone migration to be idempotent (#1687)
J0 Jul 31, 2024
8015251
fix: treat `GOTRUE_MFA_ENABLED` as meaning TOTP enabled on enroll and…
hf Jul 31, 2024
4aef63f
chore(master): release 2.158.0 (#1686)
github-actions[bot] Jul 31, 2024
a3da4b8
fix: update openapi spec for MFA (Phone) (#1689)
J0 Aug 1, 2024
6ccd814
fix: expose `X-Supabase-Api-Version` header in CORS (#1612)
hf Aug 1, 2024
250d92f
fix: refactor TOTP MFA into separate methods (#1698)
J0 Aug 2, 2024
81b332d
fix: remove check for content-length (#1700)
kangmingtay Aug 2, 2024
ac14e82
fix: include factor_id in query (#1702)
kangmingtay Aug 2, 2024
701a779
fix: move is owned by check to load factor (#1703)
J0 Aug 3, 2024
575e88a
fix: allow enabling sms hook without setting up sms provider (#1704)
kangmingtay Aug 4, 2024
078c3a8
fix: drop the MFA_ENABLED config (#1701)
J0 Aug 4, 2024
af8e2dd
fix: remove FindFactorsByUser (#1707)
J0 Aug 4, 2024
70446cc
fix: enforce uniqueness on verified phone numbers (#1693)
J0 Aug 5, 2024
29cbeb7
fix: add last_challenged_at field to mfa factors (#1705)
J0 Aug 5, 2024
e1a21a3
fix: expose factor type on challenge (#1709)
J0 Aug 5, 2024
499f6fc
chore(master): release 2.158.1 (#1699)
github-actions[bot] Aug 5, 2024
92409ea
chore: remove unused hook outputs (#1712)
kangmingtay Aug 6, 2024
b9bc769
fix: change phone constraint to per user (#1713)
J0 Aug 7, 2024
4b04327
fix: remove TOTP field for phone enroll response (#1717)
J0 Aug 9, 2024
4351226
fix: add error codes to password login flow (#1721)
kangmingtay Aug 15, 2024
b2b1123
fix: redirect invalid state errors to site url (#1722)
kangmingtay Aug 16, 2024
0658bbe
chore: updated regex for provider name (#1723)
hiteshbedre Aug 19, 2024
53c11d1
fix: ignore errors if transaction has closed already (#1726)
kangmingtay Aug 20, 2024
a9ff361
feat: Vercel marketplace OIDC (#1731)
MildTomato Aug 21, 2024
dc2391d
fix: custom SMS does not work with Twilio Verify (#1733)
hf Aug 21, 2024
66fd0c8
fix: use signing jwk to sign oauth state (#1728)
kangmingtay Aug 21, 2024
a6de8c9
chore(master): release 2.159.0 (#1716)
github-actions[bot] Aug 21, 2024
60cfb60
fix: return oauth identity when user is created (#1736)
kangmingtay Aug 23, 2024
10fa347
chore(master): release 2.159.1 (#1737)
github-actions[bot] Aug 23, 2024
2d51956
fix: allow anonymous user to update password (#1739)
kangmingtay Aug 26, 2024
c6efec4
fix: remove server side cookie token methods (#1742)
J0 Aug 28, 2024
7e38f4c
fix: hide hook name (#1743)
J0 Aug 28, 2024
d03a54e
chore(master): release 2.159.2 (#1741)
github-actions[bot] Aug 28, 2024
bf276ab
fix: apply shared limiters before email / sms is sent (#1748)
kangmingtay Aug 28, 2024
c5480ef
feat: add support for saml encrypted assertions (#1752)
hf Sep 2, 2024
2ad0737
feat: add option to disable magic links (#1756)
hf Sep 2, 2024
f3a28d1
feat: add authorized email address support (#1757)
hf Sep 2, 2024
0084625
fix: simplify WaitForCleanup (#1747)
LashaJini Sep 2, 2024
7009202
chore(master): release 2.160.0 (#1749)
github-actions[bot] Sep 2, 2024
9d419b4
fix: user sanitization should clean up email change info too (#1759)
staaldraad Sep 3, 2024
a6c1824
chore: fix gosec warnings via ignore annotations in comments (#1770)
cstockton Sep 9, 2024
7e472ad
fix: add token to hook payload for non-secure email change (#1763)
J0 Sep 11, 2024
567ea7e
fix: update mfa admin methods (#1774)
J0 Sep 12, 2024
77d5897
feat: add webauthn configuration variables (#1773)
J0 Sep 13, 2024
25d9874
fix: update aal requirements to update user (#1766)
J0 Sep 17, 2024
c2b2f96
fix: add additional information around errors for missing content typ…
J0 Sep 18, 2024
6ee0091
feat: config reloading (#1771)
cstockton Sep 24, 2024
ed91c59
feat: add `x-sb-error-code` header, show error code in logs (#1765)
hf Sep 24, 2024
5b03fda
chore(master): release 2.161.0 (#1760)
github-actions[bot] Sep 24, 2024
7a5411f
fix: magiclink failing due to passwordStrength check (#1769)
klajdi369 Sep 24, 2024
ba00f75
feat: add support for migration of firebase scrypt passwords (#1768)
J0 Sep 26, 2024
1af203f
fix: apply authorized email restriction to non-admin routes (#1778)
kangmingtay Sep 27, 2024
2c13a7f
chore(master): release 2.162.0 (#1777)
github-actions[bot] Sep 27, 2024
9ac2ea0
fix: bypass check for token & verify endpoints (#1785)
kangmingtay Oct 3, 2024
85d400a
chore(master): release 2.162.1 (#1786)
github-actions[bot] Oct 3, 2024
97a48f6
fix: upgrade ci Go version (#1782)
J0 Oct 3, 2024
819dabb
ci: update openapi spec for saml and generate_link (#1783)
J0 Oct 3, 2024
410b8ac
fix: refactor mfa validation into functions (#1780)
J0 Oct 3, 2024
2e9b144
fix: validateEmail should normalise emails (#1790)
kangmingtay Oct 5, 2024
56e3d33
chore(master): release 2.162.2 (#1787)
github-actions[bot] Oct 5, 2024
aeb5d8f
fix: add twilio verify support on mfa (#1714)
J0 Oct 9, 2024
7f006b6
fix: fix `getExcludedColumns` slice allocation (#1788)
cuishuang Oct 10, 2024
0a3968b
feat: preserve rate limiters in memory across configuration reloads (…
cstockton Oct 10, 2024
646dc66
fix: Fix reqPath for bypass check for verify EP (#1789)
angelolamonaca Oct 11, 2024
8cc2f0e
feat: add MFA for WebAuthn (#1775)
J0 Oct 11, 2024
5e94047
feat: configurable email and sms rate limiting (#1800)
cstockton Oct 14, 2024
fa6f729
fix: inline mailme package for easy development (#1803)
hf Oct 14, 2024
3af03be
fix: email header setting no longer misleading (#1802)
hf Oct 14, 2024
99d6a13
feat: add mail header support via `GOTRUE_SMTP_HEADERS` with `$messag…
hf Oct 14, 2024
9354b83
feat: mailer logging (#1805)
cstockton Oct 15, 2024
c0c5b23
fix: enforce authorized address checks on send email only (#1806)
hf Oct 15, 2024
14b375f
chore(master): release 2.163.0 (#1794)
github-actions[bot] Oct 15, 2024
4f6a461
fix: external host validation (#1808)
hf Oct 22, 2024
39459c1
chore(master): release 2.163.1 (#1809)
github-actions[bot] Oct 22, 2024
9ce2340
fix: ignore rate limits for autoconfirm (#1810)
kangmingtay Oct 22, 2024
6ac5624
chore(master): release 2.163.2 (#1811)
github-actions[bot] Oct 22, 2024
26d2e36
feat: return validation failed error if captcha request was not json …
hf Oct 25, 2024
158e473
fix: make drop_uniqueness_constraint_on_phone idempotent (#1817)
kangmingtay Oct 28, 2024
3b03472
chore: use retrieveRequestParams where possible (#1818)
kangmingtay Oct 28, 2024
fa020d0
fix: improve error messaging for http hooks (#1821)
kangmingtay Oct 28, 2024
a7129df
fix: possible panic if refresh token has a null session_id (#1822)
kangmingtay Oct 30, 2024
4614dc5
fix: add error codes to refresh token flow (#1824)
kangmingtay Nov 1, 2024
635d9ba
chore(deps): bump github.com/golang-jwt/jwt/v4 from 4.4.3 to 4.5.1 (#…
dependabot[bot] Nov 5, 2024
0a589d0
fix: correct web authn aaguid column naming (#1826)
J0 Nov 6, 2024
7c3cf26
fix: add test coverage for rate limits with 0 permitted events (#1834)
cstockton Nov 11, 2024
9ce2857
fix: default to files:read scope for Figma provider (#1831)
smogg Nov 12, 2024
cb7894e
fix: rate limits of 0 take precedence over MAILER_AUTO_CONFIRM (#1837)
cstockton Nov 13, 2024
a616451
chore(master): release 2.164.0 (#1816)
github-actions[bot] Nov 15, 2024
7de6bfb
ci: upload release artifact to supabase s3 bucket (#1812)
hf Nov 20, 2024
e358da5
feat: use embedded migrations for `migrate` command (#1843)
hf Nov 27, 2024
49fbbf0
fix: update ip mismatch error message (#1849)
J0 Nov 28, 2024
1bad34e
Revert "ci: upload release artifact to supabase s3 bucket" (#1854)
kangmingtay Dec 3, 2024
834a380
fix: return the error code instead of status code (#1855)
kangmingtay Dec 4, 2024
b33bc31
fix: fallback on btree indexes when hash is unavailable (#1856)
olirice Dec 4, 2024
307d6ee
chore: update check conventional-commits (#1857)
staaldraad Dec 4, 2024
1c7202f
fix: revert fallback on btree indexes when hash is unavailable (#1858)
J0 Dec 4, 2024
2c291f0
feat: add email validation function to lower bounce rates (#1845)
cstockton Dec 5, 2024
a19d62d
chore(master): release 2.165.0 (#1846)
github-actions[bot] Dec 5, 2024
9fe5b1e
fix: Revert "fix: revert fallback on btree indexes when hash is unava…
olirice Dec 6, 2024
40e0de1
chore(deps): bump golang.org/x/crypto from 0.26.0 to 0.31.0 (#1869)
dependabot[bot] Dec 12, 2024
483463e
fix: email_verified field not being updated on signup confirmation (#…
kangmingtay Dec 12, 2024
a6918f4
fix: handle user banned error code (#1851)
J0 Dec 13, 2024
fd82601
fix: check if session is nil (#1873)
kangmingtay Dec 13, 2024
a3eecd1
chore: merge release/2.165.0 into master (#1875)
cstockton Dec 16, 2024
f572ced
fix: skip cleanup for non-2xx status (#1877)
kangmingtay Dec 19, 2024
11a312f
feat: switch to googleapis/release-please-action, bump to 2.166.0 (#1…
hf Dec 23, 2024
6de1e19
chore(master): release 2.166.0 (#1884)
github-actions[bot] Dec 23, 2024
9dbe6ef
feat: fix argon2 parsing and comparison (#1887)
hf Dec 24, 2024
9c97b8e
chore(master): release 2.167.0 (#1888)
github-actions[bot] Dec 24, 2024
7b83c4b
docs: change coveralls image in README (#1889)
hf Dec 24, 2024
4faea5a
ci: fix coverage metering by removing files not under test (#1890)
hf Dec 24, 2024
a7f1c6e
ci: use `alpine:3` as base image (#1894)
hf Dec 27, 2024
a3cbe6a
docs: update README for command syntax and binary execution (#1897)
12138zhen Dec 30, 2024
871195f
docs: update CONTRIBUTING.md for macOS installation instructions (#1893)
12138zhen Jan 3, 2025
307892f
feat: set `email_verified` to true on all identities with the verifie…
hf Jan 6, 2025
0611897
ci: fix unspecified version at runtime in docker images (#1903)
hf Jan 6, 2025
28b715b
chore(master): release 2.168.0 (#1904)
github-actions[bot] Jan 6, 2025
5c1deb2
docs: update OpenAPI schema to use 'minimum' instead of 'min' for int…
12138zhen Jan 10, 2025
0cfd177
docs: correct casing of API key authentication in OpenAPI (#1896)
12138zhen Jan 10, 2025
174198e
feat: cover 100% of crypto with tests (#1892)
hf Jan 10, 2025
52141c6
ci: introduce dogfooding check on release (#1909)
hf Jan 11, 2025
6811fc8
ci: fix dogfooding check (#1910)
hf Jan 11, 2025
05c8c09
ci: fix dogfooding check to identify current latest rc not future rc …
hf Jan 11, 2025
daa7e37
docs: update `api.go` reference (#1912)
emmanuel-ferdman Jan 14, 2025
586df26
docs: update README to correct code snippets and add resend OTP endpo…
12138zhen Jan 14, 2025
f72f0ee
fix: improve invalid channel error message returned (#1908)
kangmingtay Jan 15, 2025
a4c692f
fix: convert refreshed_at to UTC before updating (#1916)
kangmingtay Jan 16, 2025
d6030cc
fix: improve saml assertion logging (#1915)
kangmingtay Jan 22, 2025
37e2349
chore: fix typo in contributing docs (#1923)
thuvh Jan 22, 2025
50eb69b
chore: alias to docker compose command (#1921)
thuvh Jan 23, 2025
1f06f58
feat: add an optional burstable rate limiter (#1924)
cstockton Jan 27, 2025
338a14c
chore(master): release 2.169.0 (#1907)
github-actions[bot] Jan 30, 2025
fbbebcc
fix: ignore not found error to check for pkce prefix later (#1929)
kangmingtay Jan 30, 2025
21c2256
feat: improvements to config reloader, 100% coverage (#1933)
cstockton Feb 4, 2025
8078cdc
fix: log version & migration count (#1934)
kangmingtay Feb 5, 2025
e137365
docs: update README to use better syntax for `json` code block (#1935)
burmecia Feb 6, 2025
bc57c1c
feat: increase test coverage in conf package to 100% (#1937)
cstockton Feb 7, 2025
a474b80
fix: enable SO_REUSEPORT in listener config (#1936)
kangmingtay Feb 7, 2025
5399ffc
chore: upgrade oapi-codegen (#1930)
kangmingtay Feb 7, 2025
8a26f4b
chore(deps): bump github.com/go-jose/go-jose/v3 from 3.0.3 to 3.0.4 (…
dependabot[bot] Feb 27, 2025
18fbbb5
fix: update figma token endpoint (#1952)
kangmingtay Mar 4, 2025
4a6d9bc
fix: use sys/unix instead of syscall (#1953)
kangmingtay Mar 5, 2025
225d2b6
chore: use go 1.23.7 (#1956)
kangmingtay Mar 6, 2025
779f18d
chore(master): release 2.170.0 (#1931)
github-actions[bot] Mar 6, 2025
608be00
chore(deps): bump github.com/golang-jwt/jwt/v4 from 4.5.1 to 4.5.2 (#…
dependabot[bot] Mar 23, 2025
a839d24
chore(deps): bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2 (#…
dependabot[bot] Mar 23, 2025
5eec914
chore(deps): bump golang.org/x/net from 0.25.0 to 0.36.0 (#1960)
dependabot[bot] Mar 25, 2025
6b842f6
feat: allow invalid config directories (#1969)
cstockton Mar 27, 2025
e408905
chore: move error codes to `apierrors` package (#1973)
cstockton Mar 28, 2025
e882b42
fix: propagate error when when confirming phone (#1939)
cstockton Mar 28, 2025
d121546
feat: add sign in with solana (EIP-4361) support (#1918)
Bewinxed Apr 1, 2025
ccf20d7
fix: sanitize redirect URL (remove fragment, query) before pattern ma…
doublethink Apr 1, 2025
091aef9
feat: Block specific outgoing mail servers (#1971)
doublethink Apr 1, 2025
06e9ead
fix: explicit permisions on actions (#1978)
doublethink Apr 3, 2025
696f5dc
fix: enforce email confirmation requirement for sign-ins with unverif…
flik930 Apr 8, 2025
5d74291
feat: add phone confirmation timestamp to user model
flik930 Apr 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 41 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Set the default behavior
* text=auto

# Go files
*.mod text eol=lf
*.sum text eol=lf
*.go text eol=lf

# Serialization
*.yml eol=lf
*.yaml eol=lf
*.toml eol=lf
*.json eol=lf

# Scripts
*.sh eol=lf

# DB files
*.sql eol=lf

# Html
*.html eol=lf

# Text and markdown files
*.txt text eol=lf
*.md text eol=lf

# Environment files/examples
*.env text eol=lf

# Docker files
.dockerignore text eol=lf
Dockerfile* text eol=lf

# Makefile
Makefile text eol=lf

# Git files
.gitignore text eol=lf
.gitattributes text eol=lf
.gitkeep text eol=lf
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @netlify/opensource @netlify/backend
* @supabase/auth
109 changes: 109 additions & 0 deletions .github/workflows/conventional-commits-lint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
"use strict";

const fs = require("fs");

const TITLE_PATTERN =
/^(?<prefix>[^:!(]+)(?<package>\([^)]+\))?(?<breaking>[!])?:.+$/;
const RELEASE_AS_DIRECTIVE = /^\s*Release-As:/im;
const BREAKING_CHANGE_DIRECTIVE = /^\s*BREAKING[ \t]+CHANGE:/im;

const ALLOWED_CONVENTIONAL_COMMIT_PREFIXES = [
"revert",
"feat",
"fix",
"ci",
"docs",
"chore",
];

const object = process.argv[2];
const payload = JSON.parse(fs.readFileSync(process.argv[3], "utf-8"));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Path Traversal

Unsanitized input from a command line argument flows into fs.readFileSync, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitrary files.

Line 20 | CWE-23 | Priority score 512 | Learn more about this vulnerability
Data flow: 5 steps

Step 1 - 5

const payload = JSON.parse(fs.readFileSync(process.argv[3], "utf-8"));


let validate = [];

if (object === "pr") {
validate.push({
title: payload.pull_request.title,
content: payload.pull_request.body,
});
} else if (object === "push") {
validate.push(
...payload.commits
.map((commit) => ({
title: commit.message.split("\n")[0],
content: commit.message,
}))
.filter(({ title }) => !title.startsWith("Merge branch ") && !title.startsWith("Revert ")),
);
} else {
console.error(
`Unknown object for first argument "${object}", use 'pr' or 'push'.`,
);
process.exit(0);
}

let failed = false;

validate.forEach((payload) => {
if (payload.title) {
const match = payload.title.match(TITLE_PATTERN);
if (!match) {
return
}

const { groups } = match

if (groups) {
if (groups.breaking) {
console.error(
`PRs are not allowed to declare breaking changes at this stage of the project. Please remove the ! in your PR title or commit message and adjust the functionality to be backward compatible.`,
);
failed = true;
}

if (
!ALLOWED_CONVENTIONAL_COMMIT_PREFIXES.find(
(prefix) => prefix === groups.prefix,
)
) {
console.error(
`PR (or a commit in it) is using a disallowed conventional commit prefix ("${groups.prefix}"). Only ${ALLOWED_CONVENTIONAL_COMMIT_PREFIXES.join(", ")} are allowed. Make sure the prefix is lowercase!`,
);
failed = true;
}

if (groups.package && groups.prefix !== "chore") {
console.warn(
"Avoid using package specifications in PR titles or commits except for the `chore` prefix.",
);
}
} else {
console.error(
"PR or commit title must match conventional commit structure.",
);
failed = true;
}
}

if (payload.content) {
if (payload.content.match(RELEASE_AS_DIRECTIVE)) {
console.error(
"PR descriptions or commit messages must not contain Release-As conventional commit directives.",
);
failed = true;
}

if (payload.content.match(BREAKING_CHANGE_DIRECTIVE)) {
console.error(
"PR descriptions or commit messages must not contain a BREAKING CHANGE conventional commit directive. Please adjust the functionality to be backward compatible.",
);
failed = true;
}
}
});

if (failed) {
process.exit(1);
}

process.exit(0);
48 changes: 48 additions & 0 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Check pull requests

on:
push:
branches-ignore: # Run the checks on all branches but the protected ones
- master
- release/*

pull_request:
branches:
- master
- release/*
types:
- opened
- edited
- reopened
- ready_for_review

permissions:
contents: read

jobs:
check-conventional-commits:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]' # skip for dependabot PRs
env:
EVENT: ${{ toJSON(github.event) }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github

- if: ${{ github.event_name == 'pull_request' }}
run: |
set -ex

TMP_FILE=$(mktemp)
echo "${EVENT}" > "$TMP_FILE"
node .github/workflows/conventional-commits-lint.js pr "${TMP_FILE}"

- if: ${{ github.event_name == 'push' }}
run: |
set -ex

TMP_FILE=$(mktemp)
echo "${EVENT}" > "$TMP_FILE"
node .github/workflows/conventional-commits-lint.js push "${TMP_FILE}"
60 changes: 60 additions & 0 deletions .github/workflows/dogfooding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Dogfooding Check

on:
pull_request_review:
types: [submitted, edited]

pull_request:
types:
- opened
branches:
- '*'

permissions:
contents: read

jobs:
check_dogfooding:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event.pull_request.base.ref == 'master' && github.event.pull_request.head.ref == 'release-please--branches--master'
with:
ref: master # used to identify the latest RC version via git describe --tags --match rc*
fetch-depth: 0

- if: github.event.pull_request.base.ref == 'master' && github.event.pull_request.head.ref == 'release-please--branches--master'
run: |
set -ex

# finds the latest RC version on master
RELEASE_VERSION=$(node -e "const a = '$(git describe --tags --match rc*)'.replace(/^rc/, 'v').split('-'); console.log(a[0] + '-' + a[1]);")

PROD_VERSION=$(curl 'https://auth.supabase.io/auth/v1/health' | jq -r .version)
STAGING_VERSION=$(curl 'https://alt.supabase.green/auth/v1/health' | jq -r .version)

echo "Expecting RC version $RELEASE_VERSION to be up on prod and staging."

if [ "$PROD_VERSION" != "$STAGING_VERSION" ]
then
echo "Versions on prod and staging don't match!"

exit 1
fi

if [ "$PROD_VERSION" != "$RELEASE_VERSION" ]
then
echo "Version on prod $PROD_VERSION is not the latest release candidate. Please release this RC first to proof the release before merging this PR."
exit 1
fi

echo "Release away!"
exit 0

- if: github.event.pull_request.base.ref != 'master' || github.event.pull_request.head.ref != 'release-please--branches--master'
run: |
set -ex

echo "This PR is not subject to dogfooding checks."
exit 0

100 changes: 100 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Publish to Image Registry

on:
workflow_call:
inputs:
version:
required: true
type: string

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- id: meta
uses: docker/metadata-action@v4
with:
images: |
supabase/gotrue
public.ecr.aws/supabase/gotrue
ghcr.io/supabase/gotrue
ghcr.io/supabase/auth
436098097459.dkr.ecr.us-east-1.amazonaws.com/gotrue
646182064048.dkr.ecr.us-east-1.amazonaws.com/gotrue
supabase/auth
public.ecr.aws/supabase/auth
436098097459.dkr.ecr.us-east-1.amazonaws.com/auth
646182064048.dkr.ecr.us-east-1.amazonaws.com/auth
flavor: |
latest=false
tags: |
type=raw,value=v${{ inputs.version }},enable=true

- uses: docker/setup-qemu-action@v2
with:
platforms: amd64,arm64

- run: |
set -ex

echo "Adding explicit release version to Dockerfile..."

sed -i 's/RELEASE_VERSION=unspecified/RELEASE_VERSION=${{ inputs.version }}/' Dockerfile

- uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: configure aws credentials - prod
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
aws-region: us-east-1
- name: Login to ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
- name: Login to ECR account - prod
uses: docker/login-action@v2
with:
registry: 646182064048.dkr.ecr.us-east-1.amazonaws.com

- name: configure aws credentials - staging
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.DEV_AWS_ROLE }}
aws-region: us-east-1
- name: Login to ECR account - staging
uses: docker/login-action@v2
with:
registry: 436098097459.dkr.ecr.us-east-1.amazonaws.com

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v3
with:
context: . # IMPORTANT: Dockerfile is modified above to include the release version. Don't remove this line: https://github.com/docker/build-push-action?tab=readme-ov-file#git-context
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
Loading