Skip to content

Commit 07889d3

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 54b4658 + 91e9eca commit 07889d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3549
-1495
lines changed

.github/workflows/conventional-commits-lint.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ let failed = false;
4646

4747
validate.forEach((payload) => {
4848
if (payload.title) {
49-
const { groups } = payload.title.match(TITLE_PATTERN);
49+
const match = payload.title.match(TITLE_PATTERN);
50+
if (!match) {
51+
return
52+
}
53+
54+
const { groups } = match
5055

5156
if (groups) {
5257
if (groups.breaking) {

CHANGELOG.md

+102
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,107 @@
11
# Changelog
22

3+
## [2.149.0](https://github.com/supabase/auth/compare/v2.148.0...v2.149.0) (2024-04-15)
4+
5+
6+
### Features
7+
8+
* refactor generate accesss token to take in request ([#1531](https://github.com/supabase/auth/issues/1531)) ([e4f2b59](https://github.com/supabase/auth/commit/e4f2b59e8e1f8158b6461a384349f1a32cc1bf9a))
9+
10+
11+
### Bug Fixes
12+
13+
* linkedin_oidc provider error ([#1534](https://github.com/supabase/auth/issues/1534)) ([4f5e8e5](https://github.com/supabase/auth/commit/4f5e8e5120531e5a103fbdda91b51cabcb4e1a8c))
14+
* revert patch for linkedin_oidc provider error ([#1535](https://github.com/supabase/auth/issues/1535)) ([58ef4af](https://github.com/supabase/auth/commit/58ef4af0b4224b78cd9e59428788d16a8d31e562))
15+
* update linkedin issuer url ([#1536](https://github.com/supabase/auth/issues/1536)) ([10d6d8b](https://github.com/supabase/auth/commit/10d6d8b1eafa504da2b2a351d1f64a3a832ab1b9))
16+
17+
## [2.148.0](https://github.com/supabase/auth/compare/v2.147.1...v2.148.0) (2024-04-10)
18+
19+
20+
### Features
21+
22+
* add array attribute mapping for SAML ([#1526](https://github.com/supabase/auth/issues/1526)) ([7326285](https://github.com/supabase/auth/commit/7326285c8af5c42e5c0c2d729ab224cf33ac3a1f))
23+
24+
## [2.147.1](https://github.com/supabase/auth/compare/v2.147.0...v2.147.1) (2024-04-09)
25+
26+
27+
### Bug Fixes
28+
29+
* add validation and proper decoding on send email hook ([#1520](https://github.com/supabase/auth/issues/1520)) ([e19e762](https://github.com/supabase/auth/commit/e19e762e3e29729a1d1164c65461427822cc87f1))
30+
* remove deprecated LogoutAllRefreshTokens ([#1519](https://github.com/supabase/auth/issues/1519)) ([35533ea](https://github.com/supabase/auth/commit/35533ea100669559e1209ecc7b091db3657234d9))
31+
32+
## [2.147.0](https://github.com/supabase/auth/compare/v2.146.0...v2.147.0) (2024-04-05)
33+
34+
35+
### Features
36+
37+
* add send email Hook ([#1512](https://github.com/supabase/auth/issues/1512)) ([cf42e02](https://github.com/supabase/auth/commit/cf42e02ec63779f52b1652a7413f64994964c82d))
38+
39+
## [2.146.0](https://github.com/supabase/auth/compare/v2.145.0...v2.146.0) (2024-04-03)
40+
41+
42+
### Features
43+
44+
* add custom sms hook ([#1474](https://github.com/supabase/auth/issues/1474)) ([0f6b29a](https://github.com/supabase/auth/commit/0f6b29a46f1dcbf92aa1f7cb702f42e7640f5f93))
45+
* forbid generating an access token without a session ([#1504](https://github.com/supabase/auth/issues/1504)) ([795e93d](https://github.com/supabase/auth/commit/795e93d0afbe94bcd78489a3319a970b7bf8e8bc))
46+
47+
48+
### Bug Fixes
49+
50+
* add cleanup statement for anonymous users ([#1497](https://github.com/supabase/auth/issues/1497)) ([cf2372a](https://github.com/supabase/auth/commit/cf2372a177796b829b72454e7491ce768bf5a42f))
51+
* generate signup link should not error ([#1514](https://github.com/supabase/auth/issues/1514)) ([4fc3881](https://github.com/supabase/auth/commit/4fc388186ac7e7a9a32ca9b963a83d6ac2eb7603))
52+
* move all EmailActionTypes to mailer package ([#1510](https://github.com/supabase/auth/issues/1510)) ([765db08](https://github.com/supabase/auth/commit/765db08582669a1b7f054217fa8f0ed45804c0b5))
53+
* refactor mfa and aal update methods ([#1503](https://github.com/supabase/auth/issues/1503)) ([31a5854](https://github.com/supabase/auth/commit/31a585429bf248aa919d94c82c7c9e0c1c695461))
54+
* rename from CustomSMSProvider to SendSMS ([#1513](https://github.com/supabase/auth/issues/1513)) ([c0bc37b](https://github.com/supabase/auth/commit/c0bc37b44effaebb62ba85102f072db07fe57e48))
55+
56+
## [2.145.0](https://github.com/supabase/gotrue/compare/v2.144.0...v2.145.0) (2024-03-26)
57+
58+
59+
### Features
60+
61+
* add error codes ([#1377](https://github.com/supabase/gotrue/issues/1377)) ([e4beea1](https://github.com/supabase/gotrue/commit/e4beea1cdb80544b0581f1882696a698fdf64938))
62+
* add kakao OIDC ([#1381](https://github.com/supabase/gotrue/issues/1381)) ([b5566e7](https://github.com/supabase/gotrue/commit/b5566e7ac001cc9f2bac128de0fcb908caf3a5ed))
63+
* clean up expired factors ([#1371](https://github.com/supabase/gotrue/issues/1371)) ([5c94207](https://github.com/supabase/gotrue/commit/5c9420743a9aef0675f823c30aa4525b4933836e))
64+
* configurable NameID format for SAML provider ([#1481](https://github.com/supabase/gotrue/issues/1481)) ([ef405d8](https://github.com/supabase/gotrue/commit/ef405d89e69e008640f275bc37f8ec02ad32da40))
65+
* HTTP Hook - Add custom envconfig decoding for HTTP Hook Secrets ([#1467](https://github.com/supabase/gotrue/issues/1467)) ([5b24c4e](https://github.com/supabase/gotrue/commit/5b24c4eb05b2b52c4177d5f41cba30cb68495c8c))
66+
* refactor PKCE FlowState to reduce duplicate code ([#1446](https://github.com/supabase/gotrue/issues/1446)) ([b8d0337](https://github.com/supabase/gotrue/commit/b8d0337922c6712380f6dc74f7eac9fb71b1ae48))
67+
68+
69+
### Bug Fixes
70+
71+
* add http support for https hooks on localhost ([#1484](https://github.com/supabase/gotrue/issues/1484)) ([5c04104](https://github.com/supabase/gotrue/commit/5c04104bf77a9c2db46d009764ec3ec3e484fc09))
72+
* cleanup panics due to bad inactivity timeout code ([#1471](https://github.com/supabase/gotrue/issues/1471)) ([548edf8](https://github.com/supabase/gotrue/commit/548edf898161c9ba9a136fc99ec2d52a8ba1f856))
73+
* **docs:** remove bracket on file name for broken link ([#1493](https://github.com/supabase/gotrue/issues/1493)) ([96f7a68](https://github.com/supabase/gotrue/commit/96f7a68a5479825e31106c2f55f82d5b2c007c0f))
74+
* impose expiry on auth code instead of magic link ([#1440](https://github.com/supabase/gotrue/issues/1440)) ([35aeaf1](https://github.com/supabase/gotrue/commit/35aeaf1b60dd27a22662a6d1955d60cc907b55dd))
75+
* invalidate email, phone OTPs on password change ([#1489](https://github.com/supabase/gotrue/issues/1489)) ([960a4f9](https://github.com/supabase/gotrue/commit/960a4f94f5500e33a0ec2f6afe0380bbc9562500))
76+
* move creation of flow state into function ([#1470](https://github.com/supabase/gotrue/issues/1470)) ([4392a08](https://github.com/supabase/gotrue/commit/4392a08d68d18828005d11382730117a7b143635))
77+
* prevent user email side-channel leak on verify ([#1472](https://github.com/supabase/gotrue/issues/1472)) ([311cde8](https://github.com/supabase/gotrue/commit/311cde8d1e82f823ae26a341e068034d60273864))
78+
* refactor email sending functions ([#1495](https://github.com/supabase/gotrue/issues/1495)) ([285c290](https://github.com/supabase/gotrue/commit/285c290adf231fea7ca1dff954491dc427cf18e2))
79+
* refactor factor_test to centralize setup ([#1473](https://github.com/supabase/gotrue/issues/1473)) ([c86007e](https://github.com/supabase/gotrue/commit/c86007e59684334b5e8c2285c36094b6eec89442))
80+
* refactor mfa challenge and tests ([#1469](https://github.com/supabase/gotrue/issues/1469)) ([6c76f21](https://github.com/supabase/gotrue/commit/6c76f21cee5dbef0562c37df6a546939affb2f8d))
81+
* Resend SMS when duplicate SMS sign ups are made ([#1490](https://github.com/supabase/gotrue/issues/1490)) ([73240a0](https://github.com/supabase/gotrue/commit/73240a0b096977703e3c7d24a224b5641ce47c81))
82+
* unlink identity bugs ([#1475](https://github.com/supabase/gotrue/issues/1475)) ([73e8d87](https://github.com/supabase/gotrue/commit/73e8d8742de3575b3165a707b5d2f486b2598d9d))
83+
84+
## [2.144.0](https://github.com/supabase/gotrue/compare/v2.143.0...v2.144.0) (2024-03-04)
85+
86+
87+
### Features
88+
89+
* add configuration for custom sms sender hook ([#1428](https://github.com/supabase/gotrue/issues/1428)) ([1ea56b6](https://github.com/supabase/gotrue/commit/1ea56b62d47edb0766d9e445406ecb43d387d920))
90+
* anonymous sign-ins ([#1460](https://github.com/supabase/gotrue/issues/1460)) ([130df16](https://github.com/supabase/gotrue/commit/130df165270c69c8e28aaa1b9421342f997c1ff3))
91+
* clean up test setup in MFA tests ([#1452](https://github.com/supabase/gotrue/issues/1452)) ([7185af8](https://github.com/supabase/gotrue/commit/7185af8de4a269cdde2629054d222333d3522ebe))
92+
* pass transaction to `invokeHook`, fixing pool exhaustion ([#1465](https://github.com/supabase/gotrue/issues/1465)) ([b536d36](https://github.com/supabase/gotrue/commit/b536d368f35adb31f937169e3f093d28352fa7be))
93+
* refactor resource owner password grant ([#1443](https://github.com/supabase/gotrue/issues/1443)) ([e63ad6f](https://github.com/supabase/gotrue/commit/e63ad6ff0f67d9a83456918a972ecb5109125628))
94+
* use dummy instance id to improve performance on refresh token queries ([#1454](https://github.com/supabase/gotrue/issues/1454)) ([656474e](https://github.com/supabase/gotrue/commit/656474e1b9ff3d5129190943e8c48e456625afe5))
95+
96+
97+
### Bug Fixes
98+
99+
* expose `provider` under `amr` in access token ([#1456](https://github.com/supabase/gotrue/issues/1456)) ([e9f38e7](https://github.com/supabase/gotrue/commit/e9f38e76d8a7b93c5c2bb0de918a9b156155f018))
100+
* improve MFA QR Code resilience so as to support providers like 1Password ([#1455](https://github.com/supabase/gotrue/issues/1455)) ([6522780](https://github.com/supabase/gotrue/commit/652278046c9dd92f5cecd778735b058ef3fb41c7))
101+
* refactor request params to use generics ([#1464](https://github.com/supabase/gotrue/issues/1464)) ([e1cdf5c](https://github.com/supabase/gotrue/commit/e1cdf5c4b5c1bf467094f4bdcaa2e42a5cc51c20))
102+
* revert refactor resource owner password grant ([#1466](https://github.com/supabase/gotrue/issues/1466)) ([fa21244](https://github.com/supabase/gotrue/commit/fa21244fa929709470c2e1fc4092a9ce947399e7))
103+
* update file name so migration to Drop IP Address is applied ([#1447](https://github.com/supabase/gotrue/issues/1447)) ([f29e89d](https://github.com/supabase/gotrue/commit/f29e89d7d2c48ee8fd5bf8279a7fa3db0ad4d842))
104+
3105
## [2.143.0](https://github.com/supabase/gotrue/compare/v2.142.0...v2.143.0) (2024-02-19)
4106

5107

CONTRIBUTING.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ We would love to have contributions from each and every one of you in the commun
44

55
## Code Of Conduct
66

7-
Please help us keep all our projects open and inclusive. Kindly follow our [Code of Conduct](<(CODE_OF_CONDUCT.md)>) to keep the ecosystem healthy and friendly for all.
7+
Please help us keep all our projects open and inclusive. Kindly follow our [Code of Conduct](CODE_OF_CONDUCT.md) to keep the ecosystem healthy and friendly for all.
88

99
## Quick Start
1010

@@ -483,12 +483,17 @@ export GOTRUE_DB_DATABASE_URL="postgres://supabase_auth_admin:root@localhost:743
483483

484484
## Helpful Docker Commands
485485

486+
```
487+
// file: docker-compose-dev.yml
488+
container_name: auth_postgres
489+
```
490+
486491
```
487492
# Command line into bash on the PostgreSQL container
488-
docker exec -it auth_postgresql bash
493+
docker exec -it auth_postgres bash
489494
490495
# Removes Container
491-
docker container rm -f auth_postgresql
496+
docker container rm -f auth_postgres
492497
493498
# Removes volume
494499
docker volume rm postgres_data

README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Auth is a user management and authentication server written in Go that powers
1212
- Sign in with external providers (Google, Apple, Facebook, Discord, ...)
1313

1414
It is originally based on the excellent
15-
[Auth codebase by Netlify](https://github.com/netlify/auth), however both have diverged significantly in features and capabilities.
15+
[GoTrue codebase by Netlify](https://github.com/netlify/gotrue), however both have diverged significantly in features and capabilities.
1616

1717
If you wish to contribute to the project, please refer to the [contributing guide](/CONTRIBUTING.md).
1818

@@ -660,7 +660,6 @@ Default Content (if template is unavailable):
660660
<p><a href="{{ .ConfirmationURL }}">Change Email</a></p>
661661
```
662662

663-
664663
### Phone Auth
665664

666665
`SMS_AUTOCONFIRM` - `bool`
@@ -717,6 +716,12 @@ Retrieve from hcaptcha or turnstile account
717716

718717
Enforce reauthentication on password update.
719718

719+
### Anonymous Sign-Ins
720+
721+
`GOTRUE_EXTERNAL_ANONYMOUS_USERS_ENABLED` - `bool`
722+
723+
Use this to enable/disable anonymous sign-ins.
724+
720725
## Endpoints
721726

722727
Auth exposes the following endpoints:

example.env

+3
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ GOTRUE_EXTERNAL_ZOOM_CLIENT_ID=""
168168
GOTRUE_EXTERNAL_ZOOM_SECRET=""
169169
GOTRUE_EXTERNAL_ZOOM_REDIRECT_URI="http://localhost:9999/callback"
170170

171+
# Anonymous auth config
172+
GOTRUE_EXTERNAL_ANONYMOUS_USERS_ENABLED="false"
173+
171174
# PKCE Config
172175
GOTRUE_EXTERNAL_FLOW_STATE_EXPIRY_DURATION="300s"
173176

go.mod

+15-12
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ require (
1313
github.com/gobwas/glob v0.2.3
1414
github.com/gofrs/uuid v4.3.1+incompatible
1515
github.com/golang-jwt/jwt v3.2.2+incompatible
16-
github.com/jackc/pgconn v1.13.0
16+
github.com/jackc/pgconn v1.14.3
1717
github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451
18-
github.com/jackc/pgproto3/v2 v2.3.1 // indirect
18+
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
1919
github.com/jmoiron/sqlx v1.3.5
2020
github.com/joho/godotenv v1.4.0
2121
github.com/kelseyhightower/envconfig v1.4.0
@@ -30,14 +30,14 @@ require (
3030
github.com/sirupsen/logrus v1.9.3
3131
github.com/spf13/cobra v1.6.1
3232
github.com/stretchr/testify v1.8.4
33-
golang.org/x/crypto v0.17.0
33+
golang.org/x/crypto v0.20.0
3434
golang.org/x/oauth2 v0.7.0
3535
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
3636
)
3737

3838
require (
3939
github.com/bits-and-blooms/bitset v1.10.0 // indirect
40-
github.com/go-jose/go-jose/v3 v3.0.1 // indirect
40+
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
4141
github.com/gobuffalo/nulls v0.4.2 // indirect
4242
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
4343
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
@@ -69,9 +69,10 @@ require (
6969
github.com/deepmap/oapi-codegen v1.12.4
7070
github.com/fatih/structs v1.1.0
7171
github.com/gobuffalo/pop/v6 v6.1.1
72-
github.com/jackc/pgx/v4 v4.17.2
72+
github.com/jackc/pgx/v4 v4.18.2
73+
github.com/standard-webhooks/standard-webhooks/libraries v0.0.0-20240303152453-e0e82adf1721
7374
github.com/supabase/hibp v0.0.0-20231124125943-d225752ae869
74-
github.com/supabase/mailme v0.0.0-20230628061017-01f68480c747
75+
github.com/supabase/mailme v0.1.0
7576
github.com/xeipuuv/gojsonschema v1.2.0
7677
)
7778

@@ -106,8 +107,8 @@ require (
106107
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
107108
github.com/jackc/pgio v1.0.0 // indirect
108109
github.com/jackc/pgpassfile v1.0.0 // indirect
109-
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
110-
github.com/jackc/pgtype v1.12.0 // indirect
110+
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
111+
github.com/jackc/pgtype v1.14.0 // indirect
111112
github.com/jonboulle/clockwork v0.2.2 // indirect
112113
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
113114
github.com/luna-duclos/instrumentedsql v1.1.3 // indirect
@@ -132,18 +133,20 @@ require (
132133
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect
133134
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
134135
golang.org/x/exp v0.0.0-20230213192124-5e25df0256eb
135-
golang.org/x/net v0.17.0 // indirect
136+
golang.org/x/net v0.21.0 // indirect
136137
golang.org/x/sync v0.1.0 // indirect
137-
golang.org/x/sys v0.15.0 // indirect
138+
golang.org/x/sys v0.17.0 // indirect
138139
golang.org/x/text v0.14.0 // indirect
139140
golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
140141
google.golang.org/appengine v1.6.7 // indirect
141142
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
142143
google.golang.org/grpc v1.56.3 // indirect
143-
google.golang.org/protobuf v1.30.0 // indirect
144+
google.golang.org/protobuf v1.33.0 // indirect
144145
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
145146
gopkg.in/yaml.v2 v2.4.0 // indirect
146147
gopkg.in/yaml.v3 v3.0.1 // indirect
147148
)
148149

149-
go 1.21
150+
go 1.21.0
151+
152+
toolchain go1.21.6

0 commit comments

Comments
 (0)