-
Notifications
You must be signed in to change notification settings - Fork 0
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
Supabase master #2
Commits on Apr 18, 2023
-
fix: fix flow state expiry check (supabase#1088)
## What kind of change does this PR introduce? Currently, the flow states don't expire as expected as the check is faulty Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 6000e70 - Browse repository at this point
Copy the full SHA 6000e70View commit details -
fix: make flow_state migrations idempotent, add index (supabase#1086)
## What kind of change does this PR introduce? With the introduction of an Authentication Method check on `FindFlowStateByUserID` we may wish to add an index. Also introduces an idempotency condition on flow state related migrations. Finally, updates the old Postgres comment by [issuing a new comment to overrwrite previous comment](https://www.postgresql.org/docs/current/sql-comment.html) Left as draft till this is tested together with other remaining PKCE changes. --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 7ca755a - Browse repository at this point
Copy the full SHA 7ca755aView commit details
Commits on Apr 19, 2023
-
fix: check freq on email change (supabase#1090)
## What kind of change does this PR introduce? * Email change requests on `PUT /user` should adhere to the max frequency rule.
Configuration menu - View commit details
-
Copy full SHA for 659ca66 - Browse repository at this point
Copy the full SHA 659ca66View commit details -
refactor: replace unprocessableEntityError with invalidPasswordLength…
…Error (supabase#1080) Missed this, follows from supabase#1078 which allows us to substitute the following two errors --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for b4f93fc - Browse repository at this point
Copy the full SHA b4f93fcView commit details
Commits on Apr 20, 2023
-
refactor: lump code redirect url generation into function (supabase#1081
Configuration menu - View commit details
-
Copy full SHA for e634d28 - Browse repository at this point
Copy the full SHA e634d28View commit details -
fix: IsDuplicatedEmail should filter out identities for the currentUs…
…er (supabase#1092) ## What kind of change does this PR introduce? * Fixes supabase#1060, supabase#988 * Allows one to pass in an optional `currentUser` into `IsDuplicatedUser` to exclude the user's identities when checking for duplicates * This is optional because on signup / admin create user, there won't be a current user so it's guaranteed that any identities found belongs to a different user. ## Current behaviour * Currently, `IsDuplicatedEmail` only accepts an `email` and an `aud` and uses those fields to check if the `auth.identities` table has identities with the same email. When this is used in the context of updating a user's email (`PUT /user`), `IsDuplicatedEmail` will also include identities that belong to the current user. --------- Co-authored-by: Joel Lee <lee.yi.jie.joel@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for dd2b688 - Browse repository at this point
Copy the full SHA dd2b688View commit details
Commits on Apr 21, 2023
-
refactor: simplify MFA checks (supabase#1087)
## What kind of change does this PR introduce? The current MFA checks are quite unreadable. Have refactored parts of it and I think there's more to refactor. --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for d3d32d1 - Browse repository at this point
Copy the full SHA d3d32d1View commit details
Commits on Apr 25, 2023
-
feat: add pkce to email_change routes (supabase#1082)
## What kind of change does this PR introduce? Add PKCE to email Change routes ## What is the current behavior? No PKCE on email change routes ## What is the new behavior? PKCE on email change routes ## Additional context There's an additional AMR claim known as `email_change` I'm not sure whether we want to have a special claim for this given that `email_change` is not typically classed as a login method. The other option would be to use the Magic Link AMR claim instead. Let me know if anyone has a preference here. Should be tested with: https://github.com/supabase/gotrue-js/pull/661/files TODOs: - [x] Tests need to be written for the PKCE path --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 0f8548f - Browse repository at this point
Copy the full SHA 0f8548fView commit details
Commits on May 2, 2023
-
refactor: remove unused errors (supabase#1093)
as per title Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 8ff1661 - Browse repository at this point
Copy the full SHA 8ff1661View commit details -
feat: add turnstile support (supabase#1094)
## Overview Captcha providers are treated as generic in this PR. Users can swap out the provider which in turn swaps out only the `siteverify` URL. This approach generally works fine when considering `turnstile` and `hcaptcha` since both have similar feature sets. However, for other providers like `recaptcha` users might want to use specialized features such as Android recaptcha and recaptcha V3 score. Since the [responses slightly differ between an android response and a generic response](https://developers.google.com/recaptcha/docs/verify), we may need to introduce separate structs. Another alternative considered was to initialize a new provider type for each methods (similar to `SMSProvider`) and have corresponding `verifyCaptcha` methods for each provider. This way there is clear separation of decoding logic for response types for each provider but there will be slightly more code to maintain. ### TODOs: - [x] Manual testing with FE components After PR: - Update dashboard to reflect additional provider - Update [hcaptcha docs](https://supabase.com/docs/guides/auth/auth-captcha) --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for b1d2f1c - Browse repository at this point
Copy the full SHA b1d2f1cView commit details
Commits on May 4, 2023
-
fix: correct pkce redirect generation (supabase#1097)
## What kind of change does this PR introduce? Currently, it seems like PKCE flow implementation incorrectly adds a `?` instead of a `&` to the url when there is a redirect with multiple parameters (e.g. on `/resend` like in the url below:) . This PR aims to fix this. --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for bdf93b4 - Browse repository at this point
Copy the full SHA bdf93b4View commit details
Commits on May 5, 2023
-
feat: allow updating saml providers
metadata_xml
(supabase#1096)## What kind of change does this PR introduce? Fix the `PUT` `/admin/providers/<id>` endpoint not committing the SAMLProvider changes to the database when updating the metadata XML (resulting in a no-op). ## What is the current behavior? Updates to the metadata XML via the `/admin/providers/<id>` should be reflected on the `saml_provider` database object. ## What is the new behavior? The provider metadata XML can now be correctly updated.
Configuration menu - View commit details
-
Copy full SHA for 20e503e - Browse repository at this point
Copy the full SHA 20e503eView commit details
Commits on May 6, 2023
-
feat: fix account linking (supabase#1098)
The issue is that the modified account linking algorithm _always_ linked SSO to non-SSO accounts if a similar email account was present.
Configuration menu - View commit details
-
Copy full SHA for 93d12d9 - Browse repository at this point
Copy the full SHA 93d12d9View commit details -
fix: make migration idempotent (supabase#1079)
## What kind of change does this PR introduce? * Migration to remove duplicate index wasn't idempotent
Configuration menu - View commit details
-
Copy full SHA for 2be90c7 - Browse repository at this point
Copy the full SHA 2be90c7View commit details -
feat: add log entries for pkce (supabase#1068)
Adds appropriate audit log statements for access tracking and also for metrics tracking. For metrics tracking we can also monitor requests to the endpoint as a whole --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 9c3ba87 - Browse repository at this point
Copy the full SHA 9c3ba87View commit details
Commits on May 8, 2023
-
feat: add saml metadata force update every 24 hours (supabase#1020)
If the SAML Metadata defined via a URL does not publish validity or cache duration information, forcefully try to update it every 24 hours.
Configuration menu - View commit details
-
Copy full SHA for 965feb9 - Browse repository at this point
Copy the full SHA 965feb9View commit details -
fix: resend email change & phone change issues (supabase#1100)
## What kind of change does this PR introduce? * Fix supabase#1095 where `/resend` doesn't work if the user initially signed up with a phone number and is trying to resend an email change email
Configuration menu - View commit details
-
Copy full SHA for 184fa38 - Browse repository at this point
Copy the full SHA 184fa38View commit details
Commits on May 9, 2023
-
feat: add database cleanup logic, runs after each request (supabase#875)
Certain database entities such as refresh tokens and sessions pile up though normal operation without being cleaned up. This PR attempts to solve the problem by using a `models.Cleanup` function which takes care of these entities. The cleanup runs after each request on non-idempotent HTTP methods (POST, PUT, DELETE, PATCH). It uses fast deletes and updates using [`FOR UPDATE SKIP LOCKED`](https://www.postgresql.org/docs/current/sql-select.html#SQL-FOR-UPDATE-SHARE) so that deletes don't wait for other transactions to complete. It runs after each request as this model scales better than a background job that runs periodically as it is using resources only when the API is being used externally, making database use proportional to work performed. Rows are deleted about 24-72 hours after they have expired to aid in debugging if ever necessary.
Configuration menu - View commit details
-
Copy full SHA for aaad5bd - Browse repository at this point
Copy the full SHA aaad5bdView commit details
Commits on May 11, 2023
-
fix: add guard check in case factor, session, or user are missing (su…
…pabase#1099) Aims to prevent the existing issue where the session seems to be lost and a null pointer execption is raised. HS ID: 1575266879 The root cause is still unidentified and we have only been able to reproduce once. Hoping that with the guard check we can flag more instances. Last recorded occurrence was in April We will follow up with the user to see if there are any repeat occurences --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for b4a3fec - Browse repository at this point
Copy the full SHA b4a3fecView commit details -
feat: Add new Kakao Provider (supabase#834)
## What kind of change does this PR introduce? This PR adds Kakao(https://accounts.kakao.com/) as an external provider. ## What is the current behavior? This provider did not exist before. ## What is the new behavior? Based on Kakao developer docs(https://developers.kakao.com/), this PR creates a provider & test suite for Kakao external provider. ## Additional context Please let me know if there are any changes needed, I do acknowledge that this was once mentioned in another [comment](supabase#451 (comment)), but it seemed like the PR had been frozen since then. I wrote my own version to make sure the tests do pass and the features work properly. --------- Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for bafb89b - Browse repository at this point
Copy the full SHA bafb89bView commit details
Commits on May 12, 2023
-
fix: allow gotrue to work with multiple custom domains (supabase#999)
## What kind of change does this PR introduce? * Improves on supabase#725, albeit with a slightly different approach * Gotrue will accept an allow list of domains via a comma-separate string (`DOMAIN_ALLOW_LIST`) , which includes the `API_EXTERNAL_URL` by default. On each request, gotrue will check that the domain being used is also included in the allow list. * When gotrue starts up, it will take the `DOMAIN_ALLOW_LIST` and convert it into a map where the key is the hostname and the value is the url * When a request is made to gotrue, gotrue will check the `DomainAllowListMap` to check if there is a matching hostname before allowing the request through. If there isn't a matching hostname used, gotrue will default to use the `API_EXTERNAL_URL` instead. * This helps to make gotrue usable with multiple custom domains, and also allows the email links to contain the custom domain. * Since the `EXTERNAL_XXX_REDIRECT_URI` is derived during runtime, we can remove that config once this PR is merged in as long as the `REDIRECT_URI` is also included in the `DOMAIN_ALLOW_LIST` --------- Co-authored-by: Joel Lee <lee.yi.jie.joel@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 91a82ed - Browse repository at this point
Copy the full SHA 91a82edView commit details
Commits on May 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 2b8ba67 - Browse repository at this point
Copy the full SHA 2b8ba67View commit details
Commits on May 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 23c8b45 - Browse repository at this point
Copy the full SHA 23c8b45View commit details -
feat: add mfa cleanup (supabase#1105)
## What kind of change does this PR introduce? This PR extends supabase#875 to clean up MFA challenges as well so that they don't clog the database. ## How this was tested set `GOTRUE_DB_CLEANUP_ENABLED = true` 1. Sign up locally 2. Enroll a factor 3. `ab -p testfileforab -T application/json -H 'Authorization: Bearer <token>' -c 10 -n 100 http://localhost:9999/factors/0bca5d9c-157a-4a15-890c-2ad33415b4f3/challenge` 4. `update auth.mfa_challenges set created_at = created_at - interval '48 hours';` 5. Make about 7 requests to ensure there's a cleanup performed --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for f5c9afb - Browse repository at this point
Copy the full SHA f5c9afbView commit details -
fix: use configured redirect URL for external providers (supabase#1114)
With supabase#999 custom domains were introduced, however for OAuth, the redirect URLs should in fact be the ones specified in the config and not ones interpreted from the `X-Forwarded-Host` header.
Configuration menu - View commit details
-
Copy full SHA for 42bb1e0 - Browse repository at this point
Copy the full SHA 42bb1e0View commit details
Commits on May 30, 2023
-
fix: ignore exchangeCodeForSession when captcha is enabled (supabase#…
…1121) Aims to address supabase#1120 How this was tested: - Remote instance with Github OAuth. Enable captcha 1. Attempt to sign up w/o captcha token - this should fail 2. Attempt to sign in with Github OAuth w/o token - this should succeed and session should be loaded --------- Co-authored-by: joel@joellee.org <joel@joellee.org> Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4970bbc - Browse repository at this point
Copy the full SHA 4970bbcView commit details
Commits on May 31, 2023
-
docs: clarify mailer URL path (supabase#1113)
## What kind of change does this PR introduce? Aims to address supabase#1111 --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 577a97e - Browse repository at this point
Copy the full SHA 577a97eView commit details
Commits on Jun 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for df22915 - Browse repository at this point
Copy the full SHA df22915View commit details
Commits on Jun 7, 2023
-
feat: complete OIDC support for Apple and Google providers (supabase#…
…1108) Previously OIDC sign in (i.e. sign-in using an ID token) for Apple, Google and a few other providers was not properly supported. There was no account linking available, and there were a few security issues found with the implementation. This PR attempts to resolve all of the issues, specifically targeting Apple and Google providers, which enables native Sign in with Apple and Google with mobile or desktop apps. Furthermore, this PR paves the way towards SSO with OIDC support. Basically, the whole `POST /token?grant_type=id_token` endpoint is refactored to use the central `createAccountFromExternalIdentity` method which supports both regular and SSO accounts with automatic account linking. For both Apple and Google flows, the important thing to realize is that their OAuth2 flows are in-fact OIDC authentication flows. The Apple OAuth2 flow already used the Apple OIDC ID token to extract user information. The Google OAuth2 flow is refactored to use the OIDC ID token when available (appears to be always) or fall back to the previous implementation. Since it does not matter whether the flow is OAuth2 or OIDC, automatic account linking can take place. The remaining OIDC supported providers -- Azure, Facebook, Keycloak -- remain supported though with upgraded account linking support; however their implementations are best-effort at this point. Furthermore, the Keycloak implementation should be deprecated as it's actually solving a SSO-with-OIDC problem.
Configuration menu - View commit details
-
Copy full SHA for aab7c34 - Browse repository at this point
Copy the full SHA aab7c34View commit details
Commits on Jun 13, 2023
-
tests: fix flaky Google ID token test (supabase#1134)
Google seem to rotate their OIDC JWKS keys regularly, which made the tests fail. This time the verifier is overridden and uses a static key at the time of generating of the ID token.
Configuration menu - View commit details
-
Copy full SHA for 8eaba35 - Browse repository at this point
Copy the full SHA 8eaba35View commit details -
feat: use
otherMails
with Azure (supabase#1130)It appears that some Azure accounts may not have an `email` claim but do have [`otherMails`](https://learn.microsoft.com/en-us/azure/active-directory-b2c/user-profile-attributes). GoTrue will also extract those emails and use the first one of those as the primary if no email is defined.
Configuration menu - View commit details
-
Copy full SHA for fba1988 - Browse repository at this point
Copy the full SHA fba1988View commit details -
feat: infer
Mail
in SAML assertion and allow deleting SSO user (sup……abase#1132) PingIdentity usually sends the email address in `Mail` with capital M. We also are allowing deleting the user record when the user is SSO with the admin API.
Configuration menu - View commit details
-
Copy full SHA for 47ad9de - Browse repository at this point
Copy the full SHA 47ad9deView commit details -
feat: fix SAML metadata XML update on fetched metadata (supabase#1135)
When GoTrue needs to update the SAML metadata XML by fetching from the URL, there were a few issues: - `Update` was being called with a non-pointer argument which generally fails with a panic in Pop 😞 - Only the `metadata_xml` and `updated_at` columns should be updated This PR fixes it.
Configuration menu - View commit details
-
Copy full SHA for aba0e24 - Browse repository at this point
Copy the full SHA aba0e24View commit details
Commits on Jun 16, 2023
-
fix: duplicate identity error on update user (supabase#1141)
## What kind of change does this PR introduce? * When updating a user's email or phone number, if the user previously did not have an email or phone number associated to their account, gotrue will create an new identity for it. However, subsequent attempts to update the user's email or phone number will result in gotrue attempting to create the same identity again. This results in postgres returning a unique constraint violation. For example, assuming that the user signed up with email + password initially: ```bash # this request will create a phone identity and send an OTP to the user curl -X PUT "http://localhost:9999/user" -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"phone": "123456789"}' # this request will return a "duplicate key value violates unique constraint" error because gotrue attempts to create the same phone identity curl -X PUT "http://localhost:9999/user" -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"phone": "123456789"}' ``` * ~This PR attempts to fix this issue by only creating the identity if the user's `phone` or `phone_change` columns are empty.~
Configuration menu - View commit details
-
Copy full SHA for 39ca89c - Browse repository at this point
Copy the full SHA 39ca89cView commit details -
refactor: validate update user params separately (supabase#1144)
## What kind of change does this PR introduce? * Create a `Validate()` method to handle the validation of the request body separately * Moves some of the input validation out of the transaction into the `Validate()` method
Configuration menu - View commit details
-
Copy full SHA for 66e5f55 - Browse repository at this point
Copy the full SHA 66e5f55View commit details -
chore(deps): bump github.com/lestrrat-go/jwx from 1.2.25 to 1.2.26 (s…
…upabase#1138) Bumps [github.com/lestrrat-go/jwx](https://github.com/lestrrat-go/jwx) from 1.2.25 to 1.2.26. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/lestrrat-go/jwx/releases">github.com/lestrrat-go/jwx's releases</a>.</em></p> <blockquote> <h2>[SECURITY] v1.2.26</h2> <pre><code>v1.2.26 - 14 Jun 2023 [Security] * Potential Padding Oracle Attack Vulnerability and Timing Attack Vulnerability for JWE AES-CBC encrypted payloads affecting all v2 releases up to v2.0.10, all v1 releases up to v1.2.25, and all v0 releases up to v0.9.2 have been reported by @shogo82148. <pre><code>Please note that v0 versions will NOT receive fixes. This release fixes these vulnerabilities for the v1 series. </code></pre> <p></code></pre></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/lestrrat-go/jwx/blob/v1.2.26/Changes">github.com/lestrrat-go/jwx's changelog</a>.</em></p> <blockquote> <p>v1.2.26 - 14 Jun 2023 [Security]</p> <ul> <li> <p>Potential Padding Oracle Attack Vulnerability and Timing Attack Vulnerability for JWE AES-CBC encrypted payloads affecting all v2 releases up to v2.0.10, all v1 releases up to v1.2.25, and all v0 releases up to v0.9.2 have been reported by <a href="https://github.com/shogo82148"><code>@shogo82148</code></a>.</p> <p>Please note that v0 versions will NOT receive fixes. This release fixes these vulnerabilities for the v1 series.</p> </li> </ul> <p>[Miscellaneous]</p> <ul> <li>JWE tests now only run algorithms that are supported by the underlying <code>jose</code> tool</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/lestrrat-go/jwx/commit/d9ddbc8e5009cfdd8c28413390b67afa7f576dd6"><code>d9ddbc8</code></a> merge v1 (<a href="https://github.com/lestrrat-go/jwx/issues/936">#936</a>)</li> <li>See full diff in <a href="https://github.com/lestrrat-go/jwx/compare/v1.2.25...v1.2.26">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/lestrrat-go/jwx&package-manager=go_modules&previous-version=1.2.25&new-version=1.2.26)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/supabase/gotrue/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for b3e091f - Browse repository at this point
Copy the full SHA b3e091fView commit details
Commits on Jun 19, 2023
-
feat: return SMS ID when possible (supabase#1145)
Returns the SMS message ID as received from the SMS sending provider in `/otp` and `/resend` to aid in debugging deliverability issues. Logs also include the message ID when available.
Configuration menu - View commit details
-
Copy full SHA for 02cb927 - Browse repository at this point
Copy the full SHA 02cb927View commit details
Commits on Jun 20, 2023
-
feat: add
kid
,iss
,iat
claims to the JWT (supabase#1148)These allow for standards compliant identification of the GoTrue server issuing the JWTs as well as the key it is signing the keys with.
Configuration menu - View commit details
-
Copy full SHA for 3446197 - Browse repository at this point
Copy the full SHA 3446197View commit details -
fix: resend email change (supabase#1151)
## What kind of change does this PR introduce? * There was a regression awhile back for resending email change links so i've made the fix and added some tests to ensure it doesn't happen in the future
Configuration menu - View commit details
-
Copy full SHA for ddad10f - Browse repository at this point
Copy the full SHA ddad10fView commit details
Commits on Jun 21, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e414cb3 - Browse repository at this point
Copy the full SHA e414cb3View commit details
Commits on Jun 22, 2023
-
fix: check err before using user (supabase#1154)
## What kind of change does this PR introduce? * Set `IsSSOUser` field on user only after err has been checked, else this might result in a panic the the rare case where `models.NewUser` returns an error
Configuration menu - View commit details
-
Copy full SHA for 53e1b3a - Browse repository at this point
Copy the full SHA 53e1b3aView commit details
Commits on Jun 23, 2023
-
feat: add Figma provider (supabase#1139)
## What kind of change does this PR introduce? Feature ## What is the current behavior? No provider for Figma. ## What is the new behavior? This PR adds a new provider for Figma. ## Additional context The Figma OAuth2 API only provides a single scope ("file_read"), so there isn't a more restrictive scope solely for getting user metadata. Figma developer reference: https://www.figma.com/developers/api#oauth2
Configuration menu - View commit details
-
Copy full SHA for 007324c - Browse repository at this point
Copy the full SHA 007324cView commit details -
feat: add support for Twilio Verify (supabase#1124)
## What kind of change does this PR introduce? Aims to add Twilio Verify Support. Twilio Verify is implemented as a separate provider. Only one of Twilio Verify or Twilio Programmable messaging an be selected. At this time, we only support the use of the `whatsapp` and `sms` channels with Twilio Verify. This will affect the: 1. Signup flow 2. Verification flow (sms and phone_change) 3. Resend The token is still generated, but not used in the Twilio Verify flow. It is used as a placeholder so as to try to ensure that to the OTP returned by the Verify service can only be used with the corresponding flow it was generated for. ## What is the current behaviour? We support programmable messaging. ## What is the new behaviour? Developer can toggle between using Twilio Programmable Messaging on all flows or Twilio Verify on all flows. ## Additional context Manual tests: Probably need to be conducted on both Phone Change and SMS OTP Verification: - [x] Existing Programmable Messaging (SMS/WhatsApp) (Signup/Verify/PhoneChange) - [x] Twilio Verify(SMS/WhatsApp) - [ ] Update Frontend to include Twilio Verify Admin methods shouldn't need to be updated to send to Twilio Verify since admin methods don't require confirmation --------- Co-authored-by: joel@joellee.org <joel@joellee.org> Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 7e240f8 - Browse repository at this point
Copy the full SHA 7e240f8View commit details
Commits on Jun 26, 2023
-
chore: normalize line endings (supabase#1156)
This addresses differences in eol handling between OSes by normalizing the line endings using a `.gitattributes` file. On Windows, cloning the repo and building the containers causes the Postgres container to fail to initialize and shutdown early due to `init_postgres.sh` being copied into the container with Windows line endings. Fixes supabase#1155 New clones of the repo shouldn't have issues with this after this PR is merged. Existing clones which don't already contain `LF` line endings may have to reset using ``` git rm --cached -r . git reset --hard ``` to update their files' line endings.
Configuration menu - View commit details
-
Copy full SHA for 534172b - Browse repository at this point
Copy the full SHA 534172bView commit details -
Ignore built .exe file (supabase#1157)
Ignores the built gotrue.exe file generated on Windows. This improves development experience and repo contribution if the user clones the repo to a Windows environment. ## What is the current behavior? Git marks the built gotrue.exe file as untracked. ## What is the new behavior? Git ignores the gotrue.exe file as it already does with similar built files.
Configuration menu - View commit details
-
Copy full SHA for 4111d9a - Browse repository at this point
Copy the full SHA 4111d9aView commit details
Commits on Jun 28, 2023
-
feat: switch to github.com/supabase/mailme package (supabase#1159)
Switches to github.com/supabase/mailme instead of Netlify's mailme package. Fixes: - supabase#870
Configuration menu - View commit details
-
Copy full SHA for dbb9cf7 - Browse repository at this point
Copy the full SHA dbb9cf7View commit details -
feat: remove
SafeRoundTripper
and allow private-IP HTTP connections (……supabase#1152) Removes `SafeRoundTripper` which was a HTTP `RoundTripper` which did not allow establishing HTTP connections to servers listening on private IP addresses. This is probably inherited from the Netlify codebase, and was added as a safeguard to avoid cyclic requests with their hooks implementation which is not used by Supabase. Why it's absolutely normal to expect connections to private IP addresses: - Running GoTrue in Kuberenetes, AWS ECS, or other places. - Local development with Docker, which loves to create virtual private networks inside containers all the time. - Caches inside VPCs. - Rendering templates served only within the VPC and not those that are publicly available.
Configuration menu - View commit details
-
Copy full SHA for 773e45e - Browse repository at this point
Copy the full SHA 773e45eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58552d6 - Browse repository at this point
Copy the full SHA 58552d6View commit details
Commits on Jul 3, 2023
-
feat: add different logout scopes (supabase#1112)
Right now, probably due to a bug, `POST /logout` would log the user out from _all_ sessions they have. This is not always desired behavior. This change adds a new `scope` query param on `/logout` with these values: - `global` (default when not provided) Logs a user out from all sessions they have. - `local` Logs a user out from the current session only. - `others` Logs a user out from all other sessions except the current one. See: - supabase/auth-js#713
Configuration menu - View commit details
-
Copy full SHA for df07540 - Browse repository at this point
Copy the full SHA df07540View commit details -
feat: refactor password changes and logout (supabase#1162)
Centralizes the code to log out a user on password change. When an admin changes a password for a user, the logout is also performed now.
Configuration menu - View commit details
-
Copy full SHA for b079c35 - Browse repository at this point
Copy the full SHA b079c35View commit details -
fix: maintain query params order (supabase#1161)
## What kind of change does this PR introduce? * Maintains the order of the query params passed into the email link
Configuration menu - View commit details
-
Copy full SHA for c925065 - Browse repository at this point
Copy the full SHA c925065View commit details
Commits on Jul 4, 2023
-
fix: respect last_sign_in_at on secure password update (supabase#1164)
## What kind of change does this PR introduce? * Updating a user's password should only require reauthentication if the current session is not recent (created more than 24hrs ago)
Configuration menu - View commit details
-
Copy full SHA for 963df37 - Browse repository at this point
Copy the full SHA 963df37View commit details -
feat: require different passwords on update (supabase#1163)
When the user updates their password, the new and old passwords must be different. When an admin does it, this is not checked.
Configuration menu - View commit details
-
Copy full SHA for 154dd91 - Browse repository at this point
Copy the full SHA 154dd91View commit details
Commits on Jul 5, 2023
-
feat: allow
POST /verify
to accept a token hash (supabase#1165)## What kind of change does this PR introduce? * To enable server-side redirection via an email link, we need some way to return the session in the response body rather than in the query fragments (`GET /verify`) because the fragments can't be parsed on the server-side. * By allowing `POST /verify` to accept just a token hash, a developer would be able to set the verification URL in their email template to point to their own endpoint (`https://myapp.com/confirm-signup?token_hash=XXX&type=signup`) and parse the `token_hash` param before calling `POST /verify` with the following: ```bash curl -X POST 'http://localhost:9999/verify' -H 'Content-Type: application/json' \ -d '{"token_hash": "my_token_hash", "type": "signup" }' ``` If the token hash is valid and the request is successful, this would return the verified user's session in the response and the developer can subsequently handle any redirection on their own. --------- Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e9ab555 - Browse repository at this point
Copy the full SHA e9ab555View commit details -
feat: set
updated_at
onrefresh_tokens
when revoking family (supa……base#1167) `updated_at` was not being updated when the token family was being revoked, which makes it impossible to figure out when the revocation actually happened.
Configuration menu - View commit details
-
Copy full SHA for bebd27a - Browse repository at this point
Copy the full SHA bebd27aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 87a0da0 - Browse repository at this point
Copy the full SHA 87a0da0View commit details -
refactor: simplify validation logic (supabase#1168)
## What kind of change does this PR introduce? * Simplify PKCE param validation logic --------- Co-authored-by: Joel Lee <lee.yi.jie.joel@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ce0b86d - Browse repository at this point
Copy the full SHA ce0b86dView commit details
Commits on Jul 6, 2023
-
chore(deps): bump google.golang.org/grpc from 1.46.2 to 1.53.0 (supab…
…ase#1170) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.46.2 to 1.53.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's releases</a>.</em></p> <blockquote> <h2>Release 1.53.0</h2> <h1>API Changes</h1> <ul> <li>balancer: support injection of per-call metadata from LB policies (<a href="https://github.com/grpc/grpc-go/issues/5853">#5853</a>)</li> <li>resolver: remove deprecated field <code>resolver.Target.Endpoint</code> and replace with <code>resolver.Target.Endpoint()</code> (<a href="https://github.com/grpc/grpc-go/issues/5852">#5852</a>) <ul> <li>Special Thanks: <a href="https://github.com/kylejb"><code>@kylejb</code></a></li> </ul> </li> </ul> <h1>New Features</h1> <ul> <li>xds/ringhash: introduce <code>GRPC_RING_HASH_CAP</code> environment variable to override the maximum ring size. (<a href="https://github.com/grpc/grpc-go/issues/5884">#5884</a>)</li> <li>rls: propagate headers received in RLS response to backends (<a href="https://github.com/grpc/grpc-go/issues/5883">#5883</a>)</li> </ul> <h1>Bug Fixes</h1> <ul> <li>transport: drain client transport when streamID approaches MaxStreamID (<a href="https://github.com/grpc/grpc-go/issues/5889">#5889</a>)</li> <li>server: after GracefulStop, ensure connections are closed when final RPC completes (<a href="https://github.com/grpc/grpc-go/issues/5968">#5968</a>)</li> <li>server: fix a few issues where grpc server uses RST_STREAM for non-HTTP/2 errors (<a href="https://github.com/grpc/grpc-go/issues/5893">#5893</a>)</li> <li>xdsclient: fix race which can happen when multiple load reporting calls are made at the same time. (<a href="https://github.com/grpc/grpc-go/issues/5927">#5927</a>)</li> <li>rls: fix a data race involving the LRU cache (<a href="https://github.com/grpc/grpc-go/issues/5925">#5925</a>)</li> <li>xds: fix panic involving double close of channel in xDS transport (<a href="https://github.com/grpc/grpc-go/issues/5959">#5959</a>)</li> <li>gcp/observability: update method name validation (<a href="https://github.com/grpc/grpc-go/issues/5951">#5951</a>)</li> </ul> <h1>Documentation</h1> <ul> <li>credentials/oauth: mark <code>NewOauthAccess</code> as deprecated (<a href="https://github.com/grpc/grpc-go/issues/5882">#5882</a>) <ul> <li>Special Thanks: <a href="https://github.com/buzzsurfr"><code>@buzzsurfr</code></a></li> </ul> </li> </ul> <h2>Release 1.52.3</h2> <h1>Bug Fixes</h1> <ul> <li>Fix user-agent version</li> </ul> <h2>Release 1.52.2</h2> <h1>Bug Fixes</h1> <ul> <li>xds: fix panic involving double close of channel in xDS transport (<a href="https://github.com/grpc/grpc-go/issues/5959">#5959</a>)</li> </ul> <h2>Release 1.52.1</h2> <h1>Bug Fixes</h1> <ul> <li>grpclb: rename grpclbstate package back to state (<a href="https://github.com/grpc/grpc-go/issues/5963">#5963</a>)</li> </ul> <h2>Release 1.52.0</h2> <h1>New Features</h1> <ul> <li>xdsclient: log node ID with verbosity INFO (<a href="https://github.com/grpc/grpc-go/issues/5860">#5860</a>)</li> <li>ringhash: impose cap on <code>max_ring_size</code> to reduce possibility of OOMs (<a href="https://github.com/grpc/grpc-go/issues/5801">#5801</a>)</li> </ul> <h1>Behavior Changes</h1> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/grpc/grpc-go/commit/dba26e15a07f43875ccf806a2dd6cbcbc1c12eab"><code>dba26e1</code></a> Change version to 1.53.0 (<a href="https://github.com/grpc/grpc-go/issues/5983">#5983</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/2a1e9348ff7b5d9f4b5039e84e6c9873b5b3e26e"><code>2a1e934</code></a> server: after GracefulStop, ensure connections are closed when final RPC comp...</li> <li><a href="https://github.com/grpc/grpc-go/commit/e2d69aa076dd070e3668784c4dc8bcf7131b3f67"><code>e2d69aa</code></a> tests: fix spelling of variable (<a href="https://github.com/grpc/grpc-go/issues/5966">#5966</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/a6376c9893f56fc3819bee9ef5d71f55cc2d38dd"><code>a6376c9</code></a> xds/resolver: cleanup tests to use real xDS client 3/n (<a href="https://github.com/grpc/grpc-go/issues/5953">#5953</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/bf8fc46fa6eb913e4ed0f6dee6c6a7b75e85fbf0"><code>bf8fc46</code></a> xds/resolver: cleanup tests to use real xDS client 5/n (<a href="https://github.com/grpc/grpc-go/issues/5955">#5955</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/3930549b38c0fc4cd94a95efccf7cef5f90515fd"><code>3930549</code></a> resolver: replace resolver.Target.Endpoint field with Endpoint() method (<a href="https://github.com/grpc/grpc-go/issues/5852">#5852</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/894816c487f8dd48fc971c45a7c5baa4b86ef7de"><code>894816c</code></a> grpclb: rename <code>grpclbstate</code> package back to <code>state</code> (<a href="https://github.com/grpc/grpc-go/issues/5962">#5962</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/e5a0237a46a5f95fa571624929be10c7afebb180"><code>e5a0237</code></a> encoding: fix duplicate compressor names (<a href="https://github.com/grpc/grpc-go/issues/5958">#5958</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/4adb2a7a00d8b62df5ea34d520fe3ca13bffd31a"><code>4adb2a7</code></a> xds/resolver: cleanup tests to use real xDS client 2/n (<a href="https://github.com/grpc/grpc-go/issues/5952">#5952</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/52a8392f374b8cd60e176b67925a7f8c1605d014"><code>52a8392</code></a> gcp/observability: update method name validation (<a href="https://github.com/grpc/grpc-go/issues/5951">#5951</a>)</li> <li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.46.2...v1.53.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.46.2&new-version=1.53.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/supabase/gotrue/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 153351a - Browse repository at this point
Copy the full SHA 153351aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3b1a5b9 - Browse repository at this point
Copy the full SHA 3b1a5b9View commit details -
fix: change email update flow to return both ? messages and # messages (
supabase#1129) ## What kind of change does this PR introduce? We amend the error messages to return both ? messages and # messages when using the PKCE flow for backward compatibility with the client libraries. The client libraries will be able to fetch error message from error fragments with this change. --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 77afd28 - Browse repository at this point
Copy the full SHA 77afd28View commit details
Commits on Jul 10, 2023
-
fix: remove captcha on id_token grant (supabase#1175)
## What kind of change does this PR introduce? * Remove captcha protection on `id_token` grant since the protection is provided by the OIDC issuer * Fixes supabase#1172
Configuration menu - View commit details
-
Copy full SHA for 910079c - Browse repository at this point
Copy the full SHA 910079cView commit details
Commits on Jul 11, 2023
-
fix: support email verification type on token hash verification (supa…
…base#1177) ## What kind of change does this PR introduce? * Allow `POST /verify` to accept the email verification type when used together with the `token_hash` * For example: ``` curl -X POST "http://localhost:9999/verify" -H "Content-Type: application/json" -d '{"token_hash": "d00bae897e954fd46a72d72ee9e00eb3e061541413395f08f7f754c1", "type": "email"}' ```
Configuration menu - View commit details
-
Copy full SHA for ffa5efa - Browse repository at this point
Copy the full SHA ffa5efaView commit details
Commits on Jul 12, 2023
-
feat: drop restriction that PKCE cannot be used with autoconfirm (sup…
…abase#1176) ## What kind of change does this PR introduce? Allow autoconfirm signup to be used with PKCE. When used with PKCE, autoconfirm signups retain their behaviour of returning an access token directly ## What is the current behavior? Calling signup with autoconfirm enabled will throw an error ## What is the new behavior? Calling signup with autoconfirm enabled will return a session similar to implicit flow ## Additional context Linked to: https://github.com/supabase/gotrue/pulls?q=is%3Apr+is%3Aclosed++accept+ Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 0a6f218 - Browse repository at this point
Copy the full SHA 0a6f218View commit details -
feat: remove flow state expiry on Magic Links (PKCE) (supabase#1179)
## What kind of change does this PR introduce? Removes the expiry on flow state which might overshadow the `OTP expiry` since default OTP expiry (1 day) is typically longer than default flow state expiry (5 mins). Flow state expiry is still enforced on token exchange. ## What is the current behavior? Flow state expiry is checked on verification/issuance of Auth code ## What is the new behavior? No flow state expiry check on verification of magic link. Flow state expiry continues to be enforced on token exchange. --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for caa9393 - Browse repository at this point
Copy the full SHA caa9393View commit details -
docs: adding table of contents. (supabase#1180)
## What kind of change does this PR introduce? Docs update. ## What is the current behavior? There is no table of contents so it is not easy to search the docs. ## What is the new behavior? There is now a table of contexts for easier searching of the docs. ## Additional context N/A
Configuration menu - View commit details
-
Copy full SHA for fa5cc43 - Browse repository at this point
Copy the full SHA fa5cc43View commit details
Commits on Jul 14, 2023
-
fix: log correct referer value (supabase#1178)
## What kind of change does this PR introduce? * Currently, we always log [`r.Referer()`](https://cs.opensource.google/go/go/+/refs/tags/go1.20.5:src/net/http/request.go;l=454) in the gotrue logs. However, this assumes that the referrer is always sent in the header which is false. * Move the functions to get the referrer and validate the referrer to the `utilities` package so it can be used across the `api` and `observability` packages * Removed `getRedirectURLOrReferrer` because it's basically a repeat of `getReferrer`. You would still need to parse the `redirect_to` before calling `getRedirectURLOrReferrer` and `getReferrer` handles the parsing + validation for us already.
Configuration menu - View commit details
-
Copy full SHA for a6950a0 - Browse repository at this point
Copy the full SHA a6950a0View commit details
Commits on Jul 17, 2023
-
fix: only apply rate limit if autoconfirm is false (supabase#1184)
## What kind of change does this PR introduce? * Rate limit for total emails / sms-es sent should only be applied when autoconfirm is disabled
Configuration menu - View commit details
-
Copy full SHA for 46932da - Browse repository at this point
Copy the full SHA 46932daView commit details
Commits on Jul 18, 2023
-
refactor: move refresh token grant to new file (supabase#1187)
To make the `token.go` file less busy.
Configuration menu - View commit details
-
Copy full SHA for da96ff7 - Browse repository at this point
Copy the full SHA da96ff7View commit details
Commits on Jul 20, 2023
-
refactor: remove currently unused code (supabase#1189)
## What kind of change does this PR introduce? Removes currently unused code to improve maintainability of codebase and to increase code coverage. Feel free to let me know if there's anything people would like to keep though as some functions may have use in the near future. --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for df8460b - Browse repository at this point
Copy the full SHA df8460bView commit details -
feat: serialized access to session in
refresh_token
grant (supabase……#1190) Improves the `refresh_token` grant flow by serializing access over the session ID, so that a session cannot concurrently be refreshed. It achieves this by adding a boolean `forUpdate` parameter to `models.FindSessionByID()` and `models.FindUserWithRefreshToken()`. This in turn uses a [`SELECT ... FOR UPDATE`](https://www.postgresql.org/docs/current/sql-select.html#SQL-FOR-UPDATE-SHARE) query that locks the row from use with other flows that select it with a `FOR UPDATE` clause.
Configuration menu - View commit details
-
Copy full SHA for a8f1712 - Browse repository at this point
Copy the full SHA a8f1712View commit details
Commits on Jul 21, 2023
-
refactor: drop string cast on withDefault (supabase#1193)
## What kind of change does this PR introduce? withDefault returns a string, so cast isn't strictly needed Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 5bb5db2 - Browse repository at this point
Copy the full SHA 5bb5db2View commit details
Commits on Jul 22, 2023
-
refactor: replace fmt.Sprintf with generateTokenHash (supabase#1195)
## What kind of change does this PR introduce? see title - relevant command: ``` #!/bin/bash # Function to apply sed command to files in a directory replace_in_files() { # The sed command with the pattern for replacement sed -E -i '' 's/fmt\.Sprintf\("%x", sha256\.Sum224\(\[\]byte\(([^+]+)\+([^)]+)\)\)\)/crypto.GenerateTokenHash(\1, \2)/g' "$1" } # Check if a directory is provided as an argument if [ -z "$1" ]; then echo "Please provide the directory path as an argument." exit 1 fi # Check if the directory exists if [ ! -d "$1" ]; then echo "Directory not found: $1" exit 1 fi # Loop through all files in the directory and apply the sed command for file in "$1"/*; do if [ -f "$file" ]; then replace_in_files "$file" fi done ``` --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for ee78f36 - Browse repository at this point
Copy the full SHA ee78f36View commit details
Commits on Jul 24, 2023
-
fix: use started transaction, not a new one (supabase#1196)
Should be using `tx` in refresh token grant instead of `db`. Thanks @bnjmnt4n for [spotting this](supabase#1190 (comment)).
Configuration menu - View commit details
-
Copy full SHA for 0b5b656 - Browse repository at this point
Copy the full SHA 0b5b656View commit details -
feat: add CORS allowed headers config (supabase#1197)
Adds a new `GOTRUE_CORS_ALLOWED_HEADERS` config option to add additional allowed headers when performing CORS with GoTrue.
Configuration menu - View commit details
-
Copy full SHA for 7134000 - Browse repository at this point
Copy the full SHA 7134000View commit details
Commits on Jul 25, 2023
-
feat: return
expires_at
in addition toexpires_in
(supabase#1183)There are cases where the response for an access and refresh token takes more than 1 second. In such cases, `gotrue-js` will record the *expiry time* as the time it received the response + `expires_in`. However, this is not correct because the access token is likely to have already expired by the recorded time. With this change, `gotrue-js` can just use an `expires_at` value instead. `expires_in` is still sent for backward compatibility.
Configuration menu - View commit details
-
Copy full SHA for 3cd4bd5 - Browse repository at this point
Copy the full SHA 3cd4bd5View commit details
Commits on Jul 31, 2023
-
feat: update github.com/rs/cors to v1.9.0 (supabase#1198)
Was not using the latest version.
Configuration menu - View commit details
-
Copy full SHA for 27d3a7f - Browse repository at this point
Copy the full SHA 27d3a7fView commit details
Commits on Aug 1, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1802ff3 - Browse repository at this point
Copy the full SHA 1802ff3View commit details -
fix: remove redundant queries to get session (supabase#1204)
## What kind of change does this PR introduce? * We're querying for the session redundantly when we already have the sessionId. Every time we query for a session, it fetches all the amr claims tied to the session too. * There's no need to query for the entire session when we already have the session id, since the `auth.mfa_amr_claims` table already has a foreign-key constraint on the `auth.sessions.id` column, the insert will fail if the given `sessionId` doesn't exist
Configuration menu - View commit details
-
Copy full SHA for 669ce97 - Browse repository at this point
Copy the full SHA 669ce97View commit details -
feat: add test OTP support for mobile app reviews (supabase#1166)
When developers build mobile apps that use phone login, they need to provide pre-determined phone numbers and OTPs that will work so that automated and manual app reviewers (that work at Apple's AppStore or Google's Play Store) can test and confirm compliance with the phone system. Those reviewers / systems cannot be expected to provide their own phone number. Developers can thus set up the following environment variable: ``` GOTRUE_EXTERNAL_SMS_TEST_OTP="<phone-1>=<otp-1>, <phone-2>=<otp-2>..." GOTRUE_EXTERNAL_SMS_TEST_OTP_VALID_UNTIL="<ISO date time>" ``` SMS messages are not sent to those test phone numbers. Furthermore after the validity period has expired, they will automatically not be used. This enhances the security so that people don't forget test OTPs accidentally. Incidentally this makes it possible to use phone number logins when developing locally.
Configuration menu - View commit details
-
Copy full SHA for 2fb0cf5 - Browse repository at this point
Copy the full SHA 2fb0cf5View commit details
Commits on Aug 2, 2023
-
feat: allow
whatsapp
channels with Twilio Verify (supabase#1207)WhatsApp is supported by Twilio Verify but we've missed the validation here.
Configuration menu - View commit details
-
Copy full SHA for ff98d2f - Browse repository at this point
Copy the full SHA ff98d2fView commit details -
feat: retry concurrent refresh token attempts (supabase#1202)
With supabase#1190 each refresh token request was serialized with other such requests. However, in cases where there's a not-insignificant number of parallel refresh token requests for the same refresh token, a situation arises where a significant number of connections are opened against the database that perform little work. Furthermore, if GoTrue is configured with a bounded connection pool, this could lead to significantly reduced performance of the server. With these changes, when `SELECT ... FOR UPDATE` is used on the refresh token and session row, it is now done using the `SKIP LOCKED` clause. If one or both of those rows are already locked, GoTrue will immediately release the database connection, wait 10-30 ms and try to refresh the token again. If after 5s the lock cannot be acquired, a HTTP 409 Conflict error will be returned. Clients should consider waiting at least a few seconds before retrying on this error.
Configuration menu - View commit details
-
Copy full SHA for d894012 - Browse repository at this point
Copy the full SHA d894012View commit details -
fix: support message IDs for Twilio Whatsapp (supabase#1203)
Support the use of Message IDs for Twilio Programmable Messaging on the WhatsApp channel. Arising from a customer request during their launch. The`whatsapp:` channel currently only works when using a phone number in the Message Service ID field. It was assumed that developers would only wish to use `whatsapp` channel with a phone number. However, customers may wish to use [Geomatch](https://support.twilio.com/hc/en-us/articles/223181268-What-is-Geomatch-and-how-does-it-work-) in order to use both SMS and WhatsApp channels. When using Geomatch, Twilio will select the best suited number within the Sender pool of the Message Service and use that as the sender. For instance, if sending to the UK and there is a UK number Twilio and a German number will likely the UK number over the German number. As Geomatch only works with Message IDs we need to add support for using MessageIDs on the `whatsapp` channel on Programmable Messaging. Not needed for Twilio Verify as Twilio Verify does not require the channel to be prefixed before a phone number. --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 77e85c8 - Browse repository at this point
Copy the full SHA 77e85c8View commit details
Commits on Aug 3, 2023
-
feat: use
template/text
instead ofstrings.Replace
for phone OTP ……messages (supabase#1188) ## What kind of change does this PR introduce? As per microtask, refactors the way in which we generate the sms message template. Cautionary note: if merged, an error will be thrown if a Key other than Code is placed into the SMS template (e.g. `Your code is {{ .Code}} and {{ .SomeOtherKey}}`) and an attempt to send SMS is made. While users hopefully do not have such templates we will need to update the FE input to guard agains this --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 5caacc1 - Browse repository at this point
Copy the full SHA 5caacc1View commit details
Commits on Aug 7, 2023
-
fix: improve default settings used
## What kind of change does this PR introduce? Bug fix, setting sane defaults ## What is the current behavior? supabase#1194 - If the configuration API_EXTERNAL_URL is not set requests to gotrue return 500 errors. This configuration was undocumented and only part of some examplary configurations. - If the URLPaths for the Mailer are not set they defaulted to / which by default is not the correct endpoint to handle verification requests. ## What is the new behavior? - API_EXTERNAL_URL needs to be set for gotrue to start. - URLPaths for Invite,Confirmation,Recovery and EmailChange are set to "/verify" by default instead of "/"
Configuration menu - View commit details
-
Copy full SHA for 4745451 - Browse repository at this point
Copy the full SHA 4745451View commit details
Commits on Aug 8, 2023
-
refactor: centralize metric counter to observability package (supabas…
…e#1213) - Move metric counter to observability package so that we can reuse it to track other metrics - Rename `NetlifyMicroserviceClaims` to `AuthMicroserviceClaims` Supports the email rate limit task --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for dbee2fe - Browse repository at this point
Copy the full SHA dbee2feView commit details -
feat: add email rate limit breach metric (supabase#1208)
## What kind of change does this PR introduce? This PR aims to expose a set of email rate limit metrics as a Prometheus metric that can then be consumed by an alerting system like Prometheus. When a rate limit is triggered we increment a counter. This can then be passed to a monitoring system such as Prometheus alert manager which can fire off a notification (or similar) when a threshold (say 5 occurrences in an hour) has been breached. Extends: supabase#1213 The presence of the metric was tested via using the default `prometheus.yml` file that comes on download. To test that the rate limit is firing, we decreased `GOTRUE_RATE_LIMIT_EMAIL_SENT="5"` to 5 and ran `ab` against the endpoint like `ab -p mass_signup.txt -T application/json -c 10 -n 50 http://localhost:9999/otp` --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 4ff1fe0 - Browse repository at this point
Copy the full SHA 4ff1fe0View commit details
Commits on Aug 17, 2023
-
fix: set the otp if it's not a test otp (supabase#1223)
## What kind of change does this PR introduce? * OTP should be test if not using the test OTP --------- Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3afc8a9 - Browse repository at this point
Copy the full SHA 3afc8a9View commit details -
chore: amend email and phone enabled checks on resend (supabase#1221)
## What kind of change does this PR introduce? Move the check for whether email logins are enabled into the resend function. Also checks if Phone Logins are enabled before proceeding to resend ## What is the current behavior? Currently, the check is done in middleware. This would mean that resend requests with phone based logins will not go through if email logins are disabled. --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 943abc1 - Browse repository at this point
Copy the full SHA 943abc1View commit details
Commits on Aug 23, 2023
-
feat: add sso pkce (supabase#1137)
## What kind of change does this PR introduce? Adds support for PKCE to the SSO flow - We don't introduce a foreign key since we can have relay states which use the implicit flow and won't have an associated flow state. How this was tested: - On staging with Okta as IDP, on an instance with the branch version of GoTrue uploaded GoTrue-js PR: - supabase/auth-js#707 --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 2c0e0a1 - Browse repository at this point
Copy the full SHA 2c0e0a1View commit details
Commits on Aug 30, 2023
-
feat: expose email address being sent to for email change flow (supab…
…ase#1231) ## What kind of change does this PR introduce? - Exposes the email address that we're sending to so that devs can customize the email conditionally ### Follow Up Tasks - [x] [Update Docs around Email Templates and Update Dashboard to reflect that the SendingTo parameter exists](https://github.com/supabase/supabase/blob/master/studio/stores/authConfig/schema/AuthProviders/AuthTemplatesValidation.tsx#L128) See [the dashboard PR](supabase/supabase#16970) ### How this was tested Build and update a staging project to use the GoTrue binary from this branch. On staging, add `{{.SendingTo}}` as a parameter and execute email change. Confirm that the parameter is parsed on both emails when using secure email change. --------- Co-authored-by: joel@joellee.org <joel@joellee.org> Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f7308ad - Browse repository at this point
Copy the full SHA f7308adView commit details
Commits on Sep 4, 2023
-
feat: fix empty string parsing for
GOTRUE_SMS_TEST_OTP_VALID_UNTIL
(s……upabase#1234) Fixes an issue when `GOTRUE_SMS_TEST_OTP_VALID_UNTIL=""` the [time.Time.UnmarshalText()](https://pkg.go.dev/time#Time.UnmarshalText) function is called which does not handle empty strings. An empty string generally means unset. Note that `*time.Time` would not work for the same reason.
Configuration menu - View commit details
-
Copy full SHA for 25f2dcb - Browse repository at this point
Copy the full SHA 25f2dcbView commit details
Commits on Sep 6, 2023
-
fix: patch secure email change (double confirm) response format. (sup…
…abase#1241) ## What kind of change does this PR introduce? There are two issues the PR aims to resolve: 1. Currently, a Token Hash can be re-used twice in place of using the token hash send to the new email and a token has in the current mail. A solve attempt was originally made in supabase#1240 but a test was added in this branch. 2. Currently, the single confirmation response is slightly misformed and has an additional null param <img width="1062" alt="CleanShot 2023-09-04 at 15 47 04@2x" src="https://github.com/supabase/gotrue/assets/8011761/69da91e5-e646-4970-8e80-1659e2e3fd41"> This stems from the return in the transaction. sendJSON doesn't return an error. Consequently, he error returned by the transaction will be nil. This leads to <img width="755" alt="CleanShot 2023-09-04 at 15 47 41@2x" src="https://github.com/supabase/gotrue/assets/8011761/af583492-1aac-4cbd-aaad-856282cce808"> `sendJSON(w, http.StatusOK, token)` being run after `sendJSON` is callled which will write the `token` (`nil` in this case) to the existing singleConfirmationResponse. This in turn affects returned response for the first confirmation as the client library is unable to unpack the returned JSON with extra null leading to an error. ## What is the new behavior? Returns response <img width="617" alt="CleanShot 2023-09-04 at 15 50 07@2x" src="https://github.com/supabase/gotrue/assets/8011761/e27db0ab-0489-4cda-a25f-8a650db5cab1"> ## Additional context TODO - [x] Need to complete a test for the SecureEmailChange TokenHash to prevent a regression --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 064e8a1 - Browse repository at this point
Copy the full SHA 064e8a1View commit details -
fix: pass through redirect query parameters (supabase#1224)
## What kind of change does this PR introduce? Aims to address supabase#1150 so that we can pass redirect query parameters alongside errors. Note that if any of the existing query parameters are named `error` or `error_description` they will be overwritten. In such cases, the error added by Supabase Auth will take precedence ## What is the current behavior? When an error occurs the redirect query params only return error and error_description without other query parameters. ## How this was tested - Case with Error was induced by artifically returning an error in `internalExternalProviderCallback` - Happy path was tested as per normal --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 577e320 - Browse repository at this point
Copy the full SHA 577e320View commit details
Commits on Sep 15, 2023
-
feat: add index on user_id of mfa_factors (supabase#1247)
## What kind of change does this PR introduce? see title, supports [this internal PR](https://github.com/supabase/infrastructure/pull/14835/files) among other things Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 6ea135a - Browse repository at this point
Copy the full SHA 6ea135aView commit details
Commits on Sep 25, 2023
-
feat: add new Linkedin OIDC due to deprecated scopes for new linkedin…
… applications (supabase#1248) ## What kind of change does this PR introduce? This PR introduces a new linkedin provider to address issues related to the current LinkedIn provider no longer being available for new applications. ## What is the current behavior? LinkedIn applications created after 1st of August experience difficulties while attempting to log in with GoTrue due to incorrect scope requests. Relevant issue: supabase#1216 (comment) Relevant initial fix however would lead to breaking existing apps - supabase#1232 ## What is the new behavior? This PR aims to rectify the issue by adding a new provider with the updated OAuth scopes. Specifically, the scopes openid, email, and profile will be utilized. Additionally, the method of collecting profile information is updated, employing the /v2/userinfo API endpoint. Visual changes: No visual changes. ## Additional context I've taken the initial updates from PR supabase#1232 into the new providers while also adding the relevant settings and provider implementations. I don't know much in terms of this library so would love to get additional feedback. I validated that the - http://localhost:9999/authorize?provider=linkedin-oidc workflow worked locally and had the relevant information in the Claim --------- Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f40acfe - Browse repository at this point
Copy the full SHA f40acfeView commit details
Commits on Sep 26, 2023
-
fix: use linkedin oidc endpoint (supabase#1254)
## What kind of change does this PR introduce? * Add OIDC support for the linkedin provider as highlighted [here](https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2#validating-id-tokens) * Addresses supabase#1216
Configuration menu - View commit details
-
Copy full SHA for 6d5c8eb - Browse repository at this point
Copy the full SHA 6d5c8ebView commit details
Commits on Sep 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 52d9df7 - Browse repository at this point
Copy the full SHA 52d9df7View commit details
Commits on Sep 29, 2023
-
feat: upgrade whatsapp support on Twilio Programmable Messaging (supa…
…base#1249) ## What kind of change does this PR introduce? As of October, Meta will be having a separate category [for billing authentication related templates (such as OTP)](https://support.twilio.com/hc/en-us/articles/13550552351771-Notice-Changes-to-WhatsApp-Template-Approval-Workflows-April-2023-). Consequently, it looks like WhatsApp Authentication templates need to be [submitted for approval via the content API](https://www.twilio.com/docs/content/whatsappauthentication?code-sample=code-sending-wa-authentication-templates&code-language=Go&code-sdk-version=1.x). Consequently, there are two new parameters `ContentSID` and `ContentVariables` that need to be passed in. `ContentVariables` contains the OTP and can be passed down from the calling functions. These parameters are needed in order to allow for WhatsApp use on Twilio Programmable Messaging after October According to Twilio Support, Twilio Verify is unaffected by this change. ## What is the current behavior? Programmable Messaging will use WhatsApp templates from Twilio Dashboard ## What is the new behavior? Programmable Messaging (WhatsApp) will use templates from Content API ## Additional context - It looks like [message Content on WhatsApp will be largely standardized](https://www.twilio.com/docs/content/whatsappauthentication) so message content can't be customized. >Unlike other templates the body is preset by WhatsApp. Some modifications can be made by specifying certain parameters however custom authentication templates are not allowed. will need to call this out on the dashboard - This was tested manually by sending an OTP via toy application ## FLUPs required - [ ] Update Dashboard to include `ContentSID` - [ ] Update Twilio Programmable Messaging to advise users to submit templates for approval. Also advise devs that they will have to move any internationalization logic until further notice. They will also need to re-submit respective templates in each language. This also means that devs using WhatsApp with programmable messaging will only be able to use one language (English) unless we pass contentSID in as a parameter --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for c58febe - Browse repository at this point
Copy the full SHA c58febeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 05edd15 - Browse repository at this point
Copy the full SHA 05edd15View commit details -
fix: take into account test otp for twilio verify (supabase#1255)
## What kind of change does this PR introduce? see title, aims to address supabase#1252 and supabase/auth-js#787 TODOs: - [x] conduct an end to end test of the PR --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 18b4291 - Browse repository at this point
Copy the full SHA 18b4291View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab2aba6 - Browse repository at this point
Copy the full SHA ab2aba6View commit details
Commits on Oct 3, 2023
-
Revert "feat: upgrade whatsapp support on Twilio Programmable Messagi… (
supabase#1263) …ng (supabase#1249)" This reverts commit c58febe. Twilio recently [updated](https://support.twilio.com/hc/en-us/articles/15596541039771-New-WhatsApp-Authentication-Template-Requirements-May-2023) that they will support the basic, legacy, message for WhatsApp Twilio API (e.g. "Your Code is 123456") This means that existing devs using WhatsApp should be able to continue to use WhatsApp if they don't require customization in the message (e.g. "Your Code is 123456, for more information visit bestboats.com"). In the latter use case, developers can opt to make use of Twilio Verify which has limited restrictions around template structure Devs will more advanced use cases can move to Twilio Verify ## What kind of change does this PR introduce? Bug fix, feature, docs update, ... ## What is the current behavior? Please link any relevant issues here. ## What is the new behavior? Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots.
Configuration menu - View commit details
-
Copy full SHA for 12bfe1e - Browse repository at this point
Copy the full SHA 12bfe1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fe4285 - Browse repository at this point
Copy the full SHA 0fe4285View commit details
Commits on Oct 9, 2023
-
feat: initial fix for invite followed by signup. (supabase#1262)
## What kind of change does this PR introduce? Currently, sending an `invite` request followed by a `signup` request w/o confirmation between invite and signup will expose metadata on UserMetadata and Identities which may be perceived as a leak of sensitive information. This PR aims to clear out such metadata for cases where the dev has been invited before a signup ## Testing Instructions How to test locally: Use this admin bearer `jwt` 1. Call http://localhost:9999/invite to `myemail@gmail.com` 2. Wait 60s 3. Call http://localhost:9999/signup with `myemail@gmail.com` and check that `identities` field is blanked out --------- Co-authored-by: joel@joellee.org <joel@joellee.org> Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 76c8eeb - Browse repository at this point
Copy the full SHA 76c8eebView commit details
Commits on Oct 10, 2023
-
feat: reinstate upgrade whatsapp support on Twilio Programmable Messa…
…ging to support Content API (supabase#1266) Resinstates WhatsApp support for the content API by reinstating: supabase#1249 After further discussion, it looks like we do have users who are using custom SMS templates (e.g. "Your <company> code is {{.code}} ") We were notified that this is required as alphanumeric senders require the company name in the message. This means we will need to support the Content API as custom messages aren't allowed under Programmable Messaging API + WhatsApp Template There will be 2 more PRs after this: 1. PR to allow for backward compatibility with Basic Authentication Template 2. PR to add ContentSid env var 3. Dashboard PR to expose variable
Configuration menu - View commit details
-
Copy full SHA for 00ee75c - Browse repository at this point
Copy the full SHA 00ee75cView commit details
Commits on Oct 11, 2023
-
fix: remove organizations from fly provider (supabase#1267)
## What kind of change does this PR introduce? * Organization info is not needed
Configuration menu - View commit details
-
Copy full SHA for c79fc6e - Browse repository at this point
Copy the full SHA c79fc6eView commit details -
fix: preserve backward compatibility with Twilio Existing API (supaba…
…se#1260) ## What kind of change does this PR introduce? Twilio has come back with clarification that Legacy WhatsApp Template can contain compliant authentication template > The compliant authentication template format is supported in Content API, Content Editor and Legacy WhatsApp Templates. > Legacy Templates: Support for basic authentication message only. This means that we'd have to preserve support for messages which don't include ContentSid/ContentVariables. Namely this would be messages which are using the Legacy WhatsApp template with the message: `*{{1}}* is your verification code. For your security, do not share this code.` . It seems like anything else will be rejected. Full article: https://support.twilio.com/hc/en-us/articles/15596541039771-New-WhatsApp-Authentication-Template-Requirements-May-2023 <img width="673" alt="CleanShot 2023-10-10 at 23 30 08@2x" src="https://github.com/supabase/gotrue/assets/8011761/c8028671-9b91-484e-9223-15da25eddfa6"> --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 71fb156 - Browse repository at this point
Copy the full SHA 71fb156View commit details
Commits on Oct 12, 2023
-
chore(deps): bump golang.org/x/net from 0.10.0 to 0.17.0 (supabase#1268)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/golang/net/commit/b225e7ca6dde1ef5a5ae5ce922861bda011cfabd"><code>b225e7c</code></a> http2: limit maximum handler goroutines to MaxConcurrentStreams</li> <li><a href="https://github.com/golang/net/commit/88194ad8ab44a02ea952c169883c3f57db6cf9f4"><code>88194ad</code></a> go.mod: update golang.org/x dependencies</li> <li><a href="https://github.com/golang/net/commit/2b60a61f1e4cf3a5ecded0bd7e77ea168289e6de"><code>2b60a61</code></a> quic: fix several bugs in flow control accounting</li> <li><a href="https://github.com/golang/net/commit/73d82efb96cacc0c378bc150b56675fc191894b9"><code>73d82ef</code></a> quic: handle DATA_BLOCKED frames</li> <li><a href="https://github.com/golang/net/commit/5d5a036a503f8accd748f7453c0162115187be13"><code>5d5a036</code></a> quic: handle streams moving from the data queue to the meta queue</li> <li><a href="https://github.com/golang/net/commit/350aad2603e57013fafb1a9e2089a382fe67dc80"><code>350aad2</code></a> quic: correctly extend peer's flow control window after MAX_DATA</li> <li><a href="https://github.com/golang/net/commit/21814e71db756f39b69fb1a3e06350fa555a79b1"><code>21814e7</code></a> quic: validate connection id transport parameters</li> <li><a href="https://github.com/golang/net/commit/a600b3518eed7a9a4e24380b4b249cb986d9b64d"><code>a600b35</code></a> quic: avoid redundant MAX_DATA updates</li> <li><a href="https://github.com/golang/net/commit/ea633599b58dc6a50d33c7f5438edfaa8bc313df"><code>ea63359</code></a> http2: check stream body is present on read timeout</li> <li><a href="https://github.com/golang/net/commit/ddd8598e5694aa5e966e44573a53e895f6fa5eb2"><code>ddd8598</code></a> quic: version negotiation</li> <li>Additional commits viewable in <a href="https://github.com/golang/net/compare/v0.10.0...v0.17.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/net&package-manager=go_modules&previous-version=0.10.0&new-version=0.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/supabase/gotrue/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 482cbff - Browse repository at this point
Copy the full SHA 482cbffView commit details
Commits on Oct 16, 2023
-
feat: use OIDC ID token for Azure (supabase#1269)
Use the OIDC ID token instead of the UserInfo endpoint, as there are serious discrepancies between what is returned. --------- Co-authored-by: Joel Lee <lee.yi.jie.joel@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 57e336e - Browse repository at this point
Copy the full SHA 57e336eView commit details -
feat: add
GOTRUE_<PROVIDER>_SKIP_NONCE_CHECK
to skip nonce checks i……n ODIC flow (supabase#1264) It appears that in certain client libraries that deal with the OIDC authentication flow, such as [this one for React Native on iOS](google/GoogleSignIn-iOS#244), the clients are unable to extract the nonce that is generated randomly by the library. This option allows to temporarily drop the enforcement at the GoTrue level when performing the OIDC flow. This does remove an important security barrier, which could potentially allow "stolen" ID tokens to be used on third-party services (that have opted in to this configuration) however in the interest of flexibility and broad platform support the option is being added.
Configuration menu - View commit details
-
Copy full SHA for 4291959 - Browse repository at this point
Copy the full SHA 4291959View commit details
Commits on Oct 17, 2023
-
feat: ignore common Azure issuer for ID tokens (supabase#1272)
If the developer has configured `GOTRUE_AZURE_URL` to be `https://login.microsoftonline.com/common` then the expected issuer setting is set to `https://login.microsoftonline.com/common/v2.0`. However this is not an issuer so no ID tokens will be issued by it, but rather from all other multi-tenant apps and tenants, so it needs to be ignored from the expected issuer setting.
Configuration menu - View commit details
-
Copy full SHA for 4c50357 - Browse repository at this point
Copy the full SHA 4c50357View commit details -
fix: include
/organizations
in expected issuer exemption (supabase#……1275) ## What kind of change does this PR introduce? * The issuer can also be https://login.microsoftonline.com/organizations for applications processing accounts in any organizational directory (any Microsoft Entra directory) (see [here](https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant)) * Fixes supabase#1274
Configuration menu - View commit details
-
Copy full SHA for 47cbe6e - Browse repository at this point
Copy the full SHA 47cbe6eView commit details -
chore(deps): bump github.com/crewjam/saml from 0.4.13 to 0.4.14 (supa…
…base#1273) Bumps [github.com/crewjam/saml](https://github.com/crewjam/saml) from 0.4.13 to 0.4.14. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/crewjam/saml/commit/b07b16cf83c4171d16da4d85608cb827f183cd79"><code>b07b16c</code></a> Merge pull request from GHSA-267v-3v32-g6q5</li> <li><a href="https://github.com/crewjam/saml/commit/5f6e5ab4cdf5c62376702d00657257b7cb0f3b4d"><code>5f6e5ab</code></a> Bump golang.org/x/crypto (<a href="https://github.com/crewjam/saml/issues/538">#538</a>)</li> <li><a href="https://github.com/crewjam/saml/commit/193e551d9a8420216fae88c2b8f4b46696b7bb63"><code>193e551</code></a> update for most recent three go versions (<a href="https://github.com/crewjam/saml/issues/537">#537</a>)</li> <li><a href="https://github.com/crewjam/saml/commit/34930b26d33bfb2b3e0216c868754979e8fae7c2"><code>34930b2</code></a> Add support for hardware security module (HSM) signing. (<a href="https://github.com/crewjam/saml/issues/503">#503</a>)</li> <li><a href="https://github.com/crewjam/saml/commit/f9e67165dd9c33505409fc4ee2393528b6bdc52a"><code>f9e6716</code></a> Update golangci-lint version, linting fixes. (<a href="https://github.com/crewjam/saml/issues/511">#511</a>)</li> <li>See full diff in <a href="https://github.com/crewjam/saml/compare/v0.4.13...v0.4.14">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/crewjam/saml&package-manager=go_modules&previous-version=0.4.13&new-version=0.4.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/supabase/gotrue/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for c2c5f5c - Browse repository at this point
Copy the full SHA c2c5f5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40aed62 - Browse repository at this point
Copy the full SHA 40aed62View commit details
Commits on Oct 20, 2023
-
fix: supabase#1218 fixes existing migrations to allow namespaces!="au…
…th" (supabase#1279) ## What kind of change does this PR introduce? Bug fix; Adapting existing migrations to allow other 'Namespaces' than Auth ## What is the current behavior? If a 'Namespace' (DB-Schema) other than 'auth' should be used the migrations fail Please link any relevant issues here. supabase#1218 ## What is the new behavior? Other db-schemas might be used for gotrue. Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots.
Configuration menu - View commit details
-
Copy full SHA for 206fc09 - Browse repository at this point
Copy the full SHA 206fc09View commit details
Commits on Oct 23, 2023
-
feat: add idempotent refresh token algorithm (supabase#1278)
Modifies the refresh token algorithm to support a limited form of idempotency. The lack of this behavior is documented to cause loss of session. **Problem** GoTrue, so far, assumes that clients calling the `POST /token?grant_type=refresh_token` endpoint are guaranteed to at least save the result of the response. Like all networked software, there are no guarantees that the sender of a request will receive the response, or act on it. This problem is exacerbated by network appliances like CDNs and reverse proxies which mask the TCP stream semantics from GoTrue. A properly closed TCP stream does not mean that the receiver of the response received the stream, but rather that a proxy in the chain buffered the response. Furthermore, even if the receiver is able to receive _and parse_ the response, usually there are no guarantees that it will continue processing the response. With refresh tokens, it's incredbily important that the receiver successfully persists the new refresh token to durable storage. There are no guarantees of this as browsers and mobile apps (and the computers they run on) can die, go offline or just malfunction between sending a request and processing its response. **Solution** There are really only two solutions to this problem: 1. Idempotency. Where for the same inputs the same output is generated. 2. Double-commit. Where the receipt of the response needs to be acknowledged before the state changes. We considered a double-commit protocol, but decided against it at this time as it introduces quite a bit of complexity. We may turn to it if the limited idempotency solution does not cover a sufficient number of the cases in real-world testing. **Changes** The refresh token algorithm is changed to offer a limited form of idempotency, such that: 1. An **active refresh token** is the last non-revoked refresh token in a session. This is the token that should have been saved by the client. It can generally be only used once to generate a new active refresh token at which point it looses its status. 2. A non-active refresh token can sometimes be used again to issue a valid token: 2.1. If the non-active token is being _reused_ close to the time it was used again. 2.2. **NEW** If the non-active token is the parent of the currently active token. This case adds limited idempotency by always returning the active token, and does not create a new active refresh token.
Configuration menu - View commit details
-
Copy full SHA for b0426c6 - Browse repository at this point
Copy the full SHA b0426c6View commit details
Commits on Oct 25, 2023
-
chore(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3 (supab…
…ase#1282) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.53.0 to 1.56.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's releases</a>.</em></p> <blockquote> <h2>Release 1.56.3</h2> <h1>Security</h1> <ul> <li> <p>server: prohibit more than MaxConcurrentStreams handlers from running at once (CVE-2023-44487)</p> <p>In addition to this change, applications should ensure they do not leave running tasks behind related to the RPC before returning from method handlers, or should enforce appropriate limits on any such work.</p> </li> </ul> <h2>Release 1.56.2</h2> <ul> <li>status: To fix a panic, <code>status.FromError</code> now returns an error with <code>codes.Unknown</code> when the error implements the <code>GRPCStatus()</code> method, and calling <code>GRPCStatus()</code> returns <code>nil</code>. (<a href="https://github.com/grpc/grpc-go/issues/6374">#6374</a>)</li> </ul> <h2>Release 1.56.1</h2> <ul> <li>client: handle empty address lists correctly in addrConn.updateAddrs</li> </ul> <h2>Release 1.56.0</h2> <h1>New Features</h1> <ul> <li>client: support channel idleness using <code>WithIdleTimeout</code> dial option (<a href="https://github.com/grpc/grpc-go/issues/6263">#6263</a>) <ul> <li>This feature is currently disabled by default, but will be enabled with a 30 minute default in the future.</li> </ul> </li> <li>client: when using pickfirst, keep channel state in TRANSIENT_FAILURE until it becomes READY (<a href="https://github.com/grpc/proposal/blob/master/A62-pick-first.md">gRFC A62</a>) (<a href="https://github.com/grpc/grpc-go/issues/6306">#6306</a>)</li> <li>xds: Add support for Custom LB Policies (<a href="https://github.com/grpc/proposal/blob/master/A52-xds-custom-lb-policies.md">gRFC A52</a>) (<a href="https://github.com/grpc/grpc-go/issues/6224">#6224</a>)</li> <li>xds: support pick_first Custom LB policy (<a href="https://github.com/grpc/proposal/blob/master/A62-pick-first.md">gRFC A62</a>) (<a href="https://github.com/grpc/grpc-go/issues/6314">#6314</a>) (<a href="https://github.com/grpc/grpc-go/issues/6317">#6317</a>)</li> <li>client: add support for pickfirst address shuffling (<a href="https://github.com/grpc/proposal/blob/master/A62-pick-first.md">gRFC A62</a>) (<a href="https://github.com/grpc/grpc-go/issues/6311">#6311</a>)</li> <li>xds: Add support for String Matcher Header Matcher in RDS (<a href="https://github.com/grpc/grpc-go/issues/6313">#6313</a>)</li> <li>xds/outlierdetection: Add Channelz Logger to Outlier Detection LB (<a href="https://github.com/grpc/grpc-go/issues/6145">#6145</a>) <ul> <li>Special Thanks: <a href="https://github.com/s-matyukevich"><code>@s-matyukevich</code></a></li> </ul> </li> <li>xds: enable RLS in xDS by default (<a href="https://github.com/grpc/grpc-go/issues/6343">#6343</a>)</li> <li>orca: add support for application_utilization field and missing range checks on several metrics setters</li> <li>balancer/weightedroundrobin: add new LB policy for balancing between backends based on their load reports (<a href="https://github.com/grpc/proposal/blob/master/A58-client-side-weighted-round-robin-lb-policy.md">gRFC A58</a>) (<a href="https://github.com/grpc/grpc-go/issues/6241">#6241</a>)</li> <li>authz: add conversion of json to RBAC Audit Logging config (<a href="https://github.com/grpc/grpc-go/issues/6192">#6192</a>)</li> <li>authz: add support for stdout logger (<a href="https://github.com/grpc/grpc-go/issues/6230">#6230</a> and <a href="https://github.com/grpc/grpc-go/issues/6298">#6298</a>)</li> <li>authz: support customizable audit functionality for authorization policy (<a href="https://github.com/grpc/grpc-go/issues/6192">#6192</a> <a href="https://github.com/grpc/grpc-go/issues/6230">#6230</a> <a href="https://github.com/grpc/grpc-go/issues/6298">#6298</a> <a href="https://github.com/grpc/grpc-go/issues/6158">#6158</a> <a href="https://github.com/grpc/grpc-go/issues/6304">#6304</a> and <a href="https://github.com/grpc/grpc-go/issues/6225">#6225</a>)</li> </ul> <h1>Bug Fixes</h1> <ul> <li>orca: fix a race at startup of out-of-band metric subscriptions that would cause the report interval to request 0 (<a href="https://github.com/grpc/grpc-go/issues/6245">#6245</a>)</li> <li>xds/xdsresource: Fix Outlier Detection Config Handling and correctly set xDS Defaults (<a href="https://github.com/grpc/grpc-go/issues/6361">#6361</a>)</li> <li>xds/outlierdetection: Fix Outlier Detection Config Handling by setting defaults in ParseConfig() (<a href="https://github.com/grpc/grpc-go/issues/6361">#6361</a>)</li> </ul> <h1>API Changes</h1> <ul> <li>orca: allow a ServerMetricsProvider to be passed to the ORCA service and ServerOption (<a href="https://github.com/grpc/grpc-go/issues/6223">#6223</a>)</li> </ul> <h2>Release 1.55.1</h2> <ul> <li>status: To fix a panic, <code>status.FromError</code> now returns an error with <code>codes.Unknown</code> when the error implements the <code>GRPCStatus()</code> method, and calling <code>GRPCStatus()</code> returns <code>nil</code>. (<a href="https://github.com/grpc/grpc-go/issues/6374">#6374</a>)</li> </ul> <h2>Release 1.55.0</h2> <h1>Behavior Changes</h1> <ul> <li>xds: enable federation support by default (<a href="https://github.com/grpc/grpc-go/issues/6151">#6151</a>)</li> <li>status: <code>status.Code</code> and <code>status.FromError</code> handle wrapped errors (<a href="https://github.com/grpc/grpc-go/issues/6031">#6031</a> and <a href="https://github.com/grpc/grpc-go/issues/6150">#6150</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/grpc/grpc-go/commit/1055b481ed2204a29d233286b9b50c42b63f8825"><code>1055b48</code></a> Update version.go to 1.56.3 (<a href="https://github.com/grpc/grpc-go/issues/6713">#6713</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/5efd7bd73e11fea58d1c7f1c110902e78a286299"><code>5efd7bd</code></a> server: prohibit more than MaxConcurrentStreams handlers from running at once...</li> <li><a href="https://github.com/grpc/grpc-go/commit/bd1f038e7234580c2694e433bec5cd97e7b7f662"><code>bd1f038</code></a> Upgrade version.go to 1.56.3-dev (<a href="https://github.com/grpc/grpc-go/issues/6434">#6434</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/faab8736bf73291f92b867d5dae31c927d53d508"><code>faab873</code></a> Update version.go to v1.56.2 (<a href="https://github.com/grpc/grpc-go/issues/6432">#6432</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/6b0b291d79831b1c8caafceec268b82c92253f96"><code>6b0b291</code></a> status: fix panic when servers return a wrapped error with status OK (<a href="https://github.com/grpc/grpc-go/issues/6374">#6374</a>) ...</li> <li><a href="https://github.com/grpc/grpc-go/commit/ed56401aa514462d5371713b8ec5c889da33953c"><code>ed56401</code></a> [PSM interop] Don't fail target if sub-target already failed (<a href="https://github.com/grpc/grpc-go/issues/6390">#6390</a>) (<a href="https://github.com/grpc/grpc-go/issues/6405">#6405</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/cd6a794f0bdcf9a216e8f4d3c5717faf96d9fd78"><code>cd6a794</code></a> Update version.go to v1.56.2-dev (<a href="https://github.com/grpc/grpc-go/issues/6387">#6387</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/5b67e5ea449ef0686a0c0b6de48cd4cb63e3db2a"><code>5b67e5e</code></a> Update version.go to v1.56.1 (<a href="https://github.com/grpc/grpc-go/issues/6386">#6386</a>)</li> <li><a href="https://github.com/grpc/grpc-go/commit/d0f5150384a87f9fcac488a9c18727a55b7354c1"><code>d0f5150</code></a> client: handle empty address lists correctly in addrConn.updateAddrs (<a href="https://github.com/grpc/grpc-go/issues/6354">#6354</a>) ...</li> <li><a href="https://github.com/grpc/grpc-go/commit/997c1ea101cc5d496d2b148388f1df49632a9171"><code>997c1ea</code></a> Change version to 1.56.1-dev (<a href="https://github.com/grpc/grpc-go/issues/6345">#6345</a>)</li> <li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.53.0...v1.56.3">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.53.0&new-version=1.56.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/supabase/gotrue/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 2385212 - Browse repository at this point
Copy the full SHA 2385212View commit details
Commits on Oct 30, 2023
-
fix: Revert "fix: remove organizations from fly provider" (supabase#1287
) This reverts commit ef0614b. * Reverts this PR: supabase#1267
Configuration menu - View commit details
-
Copy full SHA for 84e16ed - Browse repository at this point
Copy the full SHA 84e16edView commit details
Commits on Nov 1, 2023
-
feat: add time-boxed sessions (supabase#1286)
Adds time-boxed sessions. These sessions time-out after a fixed amount of time configured via the `GOTRUE_SESSIONS_TIMEBOX` property (if set).
Configuration menu - View commit details
-
Copy full SHA for 9a1f461 - Browse repository at this point
Copy the full SHA 9a1f461View commit details -
Configuration menu - View commit details
-
Copy full SHA for aafad5c - Browse repository at this point
Copy the full SHA aafad5cView commit details
Commits on Nov 2, 2023
-
fix: check for pkce prefix (supabase#1291)
## What kind of change does this PR introduce? * Fixes supabase#798 * When a user requests for an email change via the `updateUser` method, it can use either the implicit or PKCE flow. However, when we verify the email change token, we should be checking for the `pkce_` prefix too.
Configuration menu - View commit details
-
Copy full SHA for 05c629b - Browse repository at this point
Copy the full SHA 05c629bView commit details -
ci: bump go version to 1.21 (supabase#1285)
Bumps CI and Dockerfiles to use version 1.21 of Go.
Configuration menu - View commit details
-
Copy full SHA for 2e9ae83 - Browse repository at this point
Copy the full SHA 2e9ae83View commit details
Commits on Nov 3, 2023
-
feat: spotify oauth (supabase#1296)
## What kind of change does this PR introduce?
Configuration menu - View commit details
-
Copy full SHA for cc07b4a - Browse repository at this point
Copy the full SHA cc07b4aView commit details
Commits on Nov 6, 2023
-
feat: add inactivity-timeout to sessions (supabase#1288)
Adds the ability for sessions to time-out after a period of inactivity. "Activity" is defined as refreshing the session. This can be configured by setting the `GOTRUE_SESSIONS_INACTIVITY_TIMEOUT` to a duration. Since this PR modifies the database by adding a new `refreshed_at` nullable column to `sessions`, it also adds some useful columns to the `sessions` table to track the `User-Agent` and IP address that performed the refresh / session creation.
Configuration menu - View commit details
-
Copy full SHA for 6c8a96e - Browse repository at this point
Copy the full SHA 6c8a96eView commit details -
refactor: rename
Session.UpdateRefresh
toUpdateRefreshInfo
(supa……base#1299) My previous force-push didn't succeed but I accidentally merged thinking it did.
Configuration menu - View commit details
-
Copy full SHA for ab7f023 - Browse repository at this point
Copy the full SHA ab7f023View commit details
Commits on Nov 7, 2023
-
feat: add cleanup for session timebox and inactivity timeout (supabas…
…e#1298) Builds on top of supabase#1288. Adds cleanup for timeboxed sessions and sessions that have expired due to inactivity timeout. It achieves backward compatibility with sessions that have `null` in `refreshed_at` by looking at the `updated_at` column of the refresh tokens table. This approach is the one that puts the least strain on the database, having considered backfilling (very expensive at least `O(nlogn)` over the whole refresh tokens table).
Configuration menu - View commit details
-
Copy full SHA for 9226979 - Browse repository at this point
Copy the full SHA 9226979View commit details
Commits on Nov 8, 2023
-
chore: session inactivity timeout test (supabase#1303)
## What kind of change does this PR introduce? * Set inactivity timeout to nil when the test completes
Configuration menu - View commit details
-
Copy full SHA for 4e382f3 - Browse repository at this point
Copy the full SHA 4e382f3View commit details
Commits on Nov 9, 2023
-
fix: update dependencies (1/2) (supabase#1304)
## What kind of change does this PR introduce? Part 1 of 2 of a PR aimed to address this issue: https://github.com/supabase/gotrue/security/dependabot/11 by updating dependencies ### Updates: - github.com/microcosm-cc/bluemonday v1.0.26 - go version Split into two PRs so as not to mix the changes to the OTEL packages with update of unrelated dependencies --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for accccee - Browse repository at this point
Copy the full SHA acccceeView commit details -
Update defaults for RATE_LIMIT_TOKEN_REFRESH (supabase#1302)
## What kind of change does this PR introduce? Change the defaults for`RATE_LIMIT_TOKEN_REFRESH` from 30 to 150 to allow for more token refreshes and also to match what is offered on the hosted platform.
Configuration menu - View commit details
-
Copy full SHA for d0d5e5d - Browse repository at this point
Copy the full SHA d0d5e5dView commit details
Commits on Nov 12, 2023
-
feat: remove opentracing (supabase#1307)
## What kind of change does this PR introduce? As per [this PR](supabase#679) and the we have deprecated opentracing and are removing it in favour of opentelemetry. This will make the update of the opentelemetry dependcies easier as we no longer have to consider opentracing specific dependencies. Relevant internal context: https://supabase.slack.com/archives/C022071RB2L/p1699451083111579 --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 93e5f82 - Browse repository at this point
Copy the full SHA 93e5f82View commit details
Commits on Nov 14, 2023
-
feat: strip user-agent from otel tracing (supabase#1309)
Strips the `User-Agent` header so that it's not traced by OpenTelemetry, while making it available for the rest of the middlewares. Fixes: https://github.com/supabase/gotrue/security/dependabot/11
Configuration menu - View commit details
-
Copy full SHA for d76f439 - Browse repository at this point
Copy the full SHA d76f439View commit details
Commits on Nov 15, 2023
-
feat: add friendly name to enroll factor response (supabase#1277)
## What kind of change does this PR introduce? See title - [x] Need to update docs PR to update GoTrue: https://github.com/supabase/gotrue/pull/1277/files Docs Update: supabase#1277 --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 3c72faf - Browse repository at this point
Copy the full SHA 3c72fafView commit details -
feat: add single session per user with tags support (supabase#1297)
Enforces a single session per user with optional tags. If a session has a tag, only the most recently refreshed session with the same tag can be refreshed. If no tags are configured, then only the most recently refreshed session of all of the user's sessions will be refreshed. Sessions that are invalid due to inactivity or timeboxing won't be considered.
Configuration menu - View commit details
-
Copy full SHA for 69feebc - Browse repository at this point
Copy the full SHA 69feebcView commit details
Commits on Nov 16, 2023
-
feat: allow unverified email signins (supabase#1301)
## What kind of change does this PR introduce? * If `GOTRUE_ALLOW_UNVERIFIED_EMAIL_SIGN_INS` is enabled, it will allow a user with an unverified email address to sign in and obtain an access token JWT * This is particularly useful for OAuth in cases where the oauth provider doesn't return an email address / the oauth user didn't verify their email address with the OAuth provider. * Tests that broke and needed fixing were due to these reasons: * `RemoveUnconfirmedIdentities` was previously buggy and shouldn't be retaining the user metadata of a previously unconfirmed identity * `GOTRUE_ALLOW_UNVERIFIED_EMAIL_SIGN_INS` is enabled by default which caused some tests to return an access token instead of an error for a user with an unverified email ## Modifications made to automatic linking algorithm * If the candidate identity doesn't have a verified email, the decision should be to create a new account. * If the email belongs to a user already, then we opt to create a new user with no email. Previously, we would attempt to create a new user and the db will return an error due to the partial unique constraint on email violation. In order to add an email to the new user, they would have to call update user (`PUT /user`) to add a new email.
Configuration menu - View commit details
-
Copy full SHA for 94293b7 - Browse repository at this point
Copy the full SHA 94293b7View commit details -
fix: allow transactions to be committed while returning a custom error (
supabase#1310) ## What kind of change does this PR introduce? * This PR introduces a new error type `CommitWithError` that allows one to commit a transaction but also return an error. * This is useful in situations where `GOTRUE_MAILER_ALLOW_UNVERIFIED_EMAIL_SIGN_INS="false"` since oauth users with an unverified email will require email confirmation before being allowed to sign-in. If the transaction doesn't get committed, the new user doesn't get created and the email confirmation sent out will not be mapped to a user in the database.
Configuration menu - View commit details
-
Copy full SHA for 8565d26 - Browse repository at this point
Copy the full SHA 8565d26View commit details
Commits on Nov 20, 2023
-
feat: fix refresh token reuse revocation (supabase#1312)
Refresh token reuse revocation was broken, as an error was returned from the transaction where the revocation took place, which rolled back any changes. This went unnoticed as the reuse error was sent. Ouch.
Configuration menu - View commit details
-
Copy full SHA for 6e313f8 - Browse repository at this point
Copy the full SHA 6e313f8View commit details -
fix: disable allow unverified email sign ins if autoconfirm enabled (s…
…upabase#1313) ## What kind of change does this PR introduce? * default `GOTRUE_MAILER_ALLOW_UNVERIFIED_EMAIL_SIGN_INS` to false
Configuration menu - View commit details
-
Copy full SHA for 9b93ac1 - Browse repository at this point
Copy the full SHA 9b93ac1View commit details -
feat: update primary key for identities table (supabase#1311)
## What kind of change does this PR introduce? * We need to be able to have a consistent identifier to fetch an identity from the database. The current approach for using a composite primary key isn't sufficient and not ideal for exposing through the API. * Remove the composite primary key on (`auth.identities.id`, `auth.identities.provider`) * Rename `auth.identities.id` to `auth.identities.provider_id` * Add a new primary key called `auth.identities.id` * Add a unique constraint on (`auth.identities.provider_id`, `auth.identities.provider`) --------- Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d8ec801 - Browse repository at this point
Copy the full SHA d8ec801View commit details
Commits on Nov 21, 2023
-
feat: add endpoint to unlink identity from user (supabase#1315)
## What kind of change does this PR introduce? * Adds an endpoint `DELETE /user/identities/{identity_id}` to allow the user to unlink an identity * User is only allowed to unlink an identity if they have more than 1 identity linked * User must be authenticated to unlink the identity ```curl // successful request $ curl -X DELETE 'http://localhost:9999/user/identities/{identity_id}' -H 'Authorization: Bearer <user's JWT>' {} ``` --------- Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for af83b34 - Browse repository at this point
Copy the full SHA af83b34View commit details
Commits on Nov 23, 2023
-
chore(deps): bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1 (s…
…upabase#1316) Bumps [github.com/go-jose/go-jose/v3](https://github.com/go-jose/go-jose) from 3.0.0 to 3.0.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/go-jose/go-jose/releases">github.com/go-jose/go-jose/v3's releases</a>.</em></p> <blockquote> <h2>Version 3.0.1</h2> <h3>Fixed</h3> <p>Security issue: an attacker specifying a large "p2c" value can cause JSONWebEncryption.Decrypt and JSONWebEncryption.DecryptMulti to consume large amounts of CPU, causing a DoS. Thanks to Matt Schwager (<a href="https://github.com/mschwager"><code>@mschwager</code></a>) for the disclosure and to Tom Tervoort for originally publishing the category of attack. <a href="https://i.blackhat.com/BH-US-23/Presentations/US-23-Tervoort-Three-New-Attacks-Against-JSON-Web-Tokens.pdf">https://i.blackhat.com/BH-US-23/Presentations/US-23-Tervoort-Three-New-Attacks-Against-JSON-Web-Tokens.pdf</a></p> <p>The release is tagged off the release-v3.0.1 branch to avoid mixing in some as-yet unreleased changes on the v3 branch.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/go-jose/go-jose/blob/v3/CHANGELOG.md">github.com/go-jose/go-jose/v3's changelog</a>.</em></p> <blockquote> <h1>v3.0.1</h1> <p>Fixed:</p> <ul> <li>Security issue: an attacker specifying a large "p2c" value can cause JSONWebEncryption.Decrypt and JSONWebEncryption.DecryptMulti to consume large amounts of CPU, causing a DoS. Thanks to Matt Schwager (<a href="https://github.com/mschwager"><code>@mschwager</code></a>) for the disclosure and to Tom Tervoort for originally publishing the category of attack. <a href="https://i.blackhat.com/BH-US-23/Presentations/US-23-Tervoort-Three-New-Attacks-Against-JSON-Web-Tokens.pdf">https://i.blackhat.com/BH-US-23/Presentations/US-23-Tervoort-Three-New-Attacks-Against-JSON-Web-Tokens.pdf</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/go-jose/go-jose/commit/47edce0854d533ac27795c9befd90b1f7ef87554"><code>47edce0</code></a> Fix decryption DoS: Reject too high p2c (<a href="https://github.com/go-jose/go-jose/issues/66">#66</a>)</li> <li>See full diff in <a href="https://github.com/go-jose/go-jose/compare/v3.0.0...v3.0.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/go-jose/go-jose/v3&package-manager=go_modules&previous-version=3.0.0&new-version=3.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/supabase/gotrue/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for fd0e543 - Browse repository at this point
Copy the full SHA fd0e543View commit details
Commits on Nov 27, 2023
-
refactor: rename
GenerateLink
toadminGenerateLink
(supabase#1320)Follows the pattern where all admin handlers are named `adminXYZ`.
Configuration menu - View commit details
-
Copy full SHA for 5ea3448 - Browse repository at this point
Copy the full SHA 5ea3448View commit details -
feat: password sign-up no longer blocks the db connection (supabase#1319
) Password sign-up would perform the password hashing while a database connection is open, thereby blocking it unnecessarily for tens of milliseconds. This can result in behavior where just a few password sign-up calls could slow down Auth entirely as the password hashing causes pool exhaustion and thus increased latency across all Auth APIs not just the password sign-up calls. The hashing is done inside `models.NewUser()` making it very difficult to refactor properly. Therefore, the model object generation is now moved as a function of `api.SignupParams.ToUserModel()`. If these params contain a password, the code is refactored to move the model generation outside of the database transaction.
Configuration menu - View commit details
-
Copy full SHA for 84d4b75 - Browse repository at this point
Copy the full SHA 84d4b75View commit details
Commits on Nov 28, 2023
-
feat: refactor for central password strength check (supabase#1321)
Refactors all places where the password strength check (right now just length check) is enforced to a single method on the API `checkPasswordStrength`. To do this, both `SignupParams` and `UserUpdateParams` had to be reworked. Furthermore user update now splits basic validation logic from user update validation logic and the main updating transaction which should drastically speed up the method itself.
Configuration menu - View commit details
-
Copy full SHA for 5524653 - Browse repository at this point
Copy the full SHA 5524653View commit details -
refactor: refactor mfa tests (supabase#1322)
## What kind of change does this PR introduce? The mfa tests are hard to read. There's also a lot of redundant code which makes testing for hooks quite a bit harder. This PR aims to remove some of the redundancy so that it's easier to write the tests for supabase#1314 Main changes include - Splitting out `enrollAndVerify` into `enroll` and `verify` - Using suite specific constants - Packaging duplicated setup code --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 0540c7f - Browse repository at this point
Copy the full SHA 0540c7fView commit details -
feat: add required characters password strength check (supabase#1323)
Adds the `GOTRUE_PASSWORD_REQUIRED_CHARACTERS` config option, which if set, will reject passwords that do not contain at least one character of each set of characters. It is defined like so: `abc...xyz:0123...89`. This means that at least one lowercase and one digit has to be present in the password to be accepted. All other characters are also allowed. To include the `:` character, escape it with `\:`. When a weak password is detected, the HTTP 429 error is sent with an additional JSON field `weak_password` that includes a `reasons` property -- an array of the strings: - `length` if the password is not long enough - `characters` if the password does not use all required character sets --------- Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3991bdb - Browse repository at this point
Copy the full SHA 3991bdbView commit details
Commits on Nov 29, 2023
-
feat: add manual linking APIs (supabase#1317)
## What kind of change does this PR introduce? * Adds a new endpoint `GET /user/identities/authorize` which is an endpoint to initiate the manual linking process and can only be invoked if the user is authenticated * `GET /user/identities/authorize` functions similarly to `GET /authorize` where the user needs to login to the new oauth identity in order to link the identity * Example ```curl // sign in with one of the supported auth methods to get the user's access token JWT first // start the identity linking process $ curl -X GET "http://localhost:9999/user/identities/authorize?provider=google" -H "Authorization: Bearer ACCESS_TOKEN_JWT" {"url":"https://oauth_provider_url.com/path/to/sign-in"} // visit the url returned and login to the oauth provider // request will be redirected to the /callback endpoint // if the identity is successfully linked, the request will be redirected to `http://localhost:3000/#access_token=xxx&....` // if the identity already exists, the request will be redirect to: // http://localhost:3000/?error=invalid_request&error_code=400&error_description=Identity+is+already+linked+to+another+user#error=invalid_request&error_code=400&error_description=Identity+is+already+linked+to+another+user ``` ## Details * The callback endpoint used will be the same callback as the oauth sign-in flow so that the developer doesn't have to add any additional callback URLs to the oauth provider in order to enable manual linking * A special field `LinkingTargetId` is introduced in the oauth state to store the linking target user ID. This ID will be used in the callback to determine the target user to link the candidate identity used * If the identity is already linked to the current user or another user, an error will be returned * If the identity doesn't exist, then it will be successfully linked to the existing user and a new access & refresh token will be issued. --------- Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 80172a1 - Browse repository at this point
Copy the full SHA 80172a1View commit details
Commits on Nov 30, 2023
-
feat: add haveibeenpwned.org password strength check (supabase#1324)
Uses Supabase's HIBP Go library to perform password strength checks using the HaveIBeenPwned.org Pwned Passwords API. You can configure this behavior by: - `GOTRUE_PASSWORD_HIBP_ENABLED` to turn it on - `GOTRUE_PASSWORD_HIBP_USER_AGENT` to specify your project's identifier - `GOTRUE_PASSWORD_HIBP_FAIL_CLOSED` if the API is unavailable (or unresponsive for 5 seconds) the response is ignored and any password is accepted, set this to true to fail with a 500 error in such cases - `GOTRUE_PASSWORD_HIBP_BLOOM_ENABLED` to enable a bloom filter cache - `GOTRUE_PASSWORD_HIBP_BLOOM_ITEMS` to specify the maximum number of pwned password hashes to be stored in the bloom filter - `GOTRUE_PASSWORD_HIBP_BLOOM_FALSE_POSITIVES` to specify the maximum number of false positives returned by the bloom filter, a value between 0 and 1 indicating _1 in X_ For bloom filters, use this calculator to understand the values: https://hur.st/bloomfilter By default 100,000 password hashes can be stored in the filter (about 100 hash prefixes). The filter resets at 80% of this value to ensure that the cache is cleared and the actual false positive rate does not go too high.
Configuration menu - View commit details
-
Copy full SHA for c3acfe7 - Browse repository at this point
Copy the full SHA c3acfe7View commit details -
feat: add mfa verification postgres hook (supabase#1314)
## What kind of change does this PR introduce? Proof of concept hook for MFA Verification. With this hook, developers can introduce additional conditions around when to accept/reject an MFA verification (e.g. log a developer out after a certain number of attempts). We distinguish this from the existing Webhooks implementation via introduction of `hooks` package which will contain future Hook related structs, constants, and utility methods. For the most part we leverage existing Postgres capabilities - as far as possible we will return the PostgreSQL error codes for debugging and use Postgres in-built timeouts to ensure hte hook doesn't overrun. ## Testing The MFA Verification Hook test suite does not guarantee accurate status codes - the test setup (to enroll factors and create a challenge after signup) requires some setup. It is reliant on `signUpAndVerify` which gets the dev to AAL2 and takes time to refactor. As such, most of the cases were manually tested in addition to the current loose check of checking for the absence of an access token. Further edits will be made in GMT +8 morning to properly check for the http status codes in the tests. Also, since `supabase_auth_admin` cannot create functions on the `public` schema we create the functions on the `auth` schema for testing. We typically discourage this on the Supabase platform but in theory there should be no issue when dealing with GoTrue (the OSS project). Will spend a short amount of time looking into alternatives tomorrow. ## Additional Notes Response schema checks are left out of this PR as they don't seem to serve as much benefit for this particular extensibility point and will probably bloat the PR a little with the introduction of a new library --------- Co-authored-by: joel@joellee.org <joel@joellee.org> Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for db344d5 - Browse repository at this point
Copy the full SHA db344d5View commit details -
feat: unlinking primary identity should update email (supabase#1326)
## What kind of change does this PR introduce? * A primary identity is implicitly defined by the first identity created when the user signs up * Addresses the issue where unlinking a primary identity results in the `auth.users.email` becoming stale. If the other identities do not have the same email, the `auth.users.email` column should be updated to use one of the existing identities emails * Update the `FindProvidersByUser` method to remove duplicates if there is more than 1 identity that share the same provider
Configuration menu - View commit details
-
Copy full SHA for bdc3300 - Browse repository at this point
Copy the full SHA bdc3300View commit details -
Configuration menu - View commit details
-
Copy full SHA for 379b066 - Browse repository at this point
Copy the full SHA 379b066View commit details
Commits on Dec 1, 2023
-
feat: refactor hook error handling (supabase#1329)
Refactors the error handling of hooks so the proper errors bubble up.
Configuration menu - View commit details
-
Copy full SHA for 72fdb16 - Browse repository at this point
Copy the full SHA 72fdb16View commit details
Commits on Dec 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9feeec4 - Browse repository at this point
Copy the full SHA 9feeec4View commit details -
Add password verification hook (supabase#1328)
## What kind of change does this PR introduce? Similar to the MFA Verification Hook, this hook should allow for developers to customize the behaviour of Supabase after a failed password verification attempt. Example use cases include: - blocking a user after multiple failed attempts. - Imposing additional restrictions on top of password verification. --------- Co-authored-by: joel@joellee.org <joel@joellee.org> Co-authored-by: Kang Ming <kang.ming1996@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4f50112 - Browse repository at this point
Copy the full SHA 4f50112View commit details -
refactor: reduce amount of test setup code in mfa tests (supabase#1333)
## What kind of change does this PR introduce? Primary goal of this refactor is to reduce number of calls to `generateAccessToken` to ease refactoring of `generateAccessToken`. This PR centralizes a few commonly used functions/objects: - `generateAccessToken` - `models.User` - It also directly accesses `models.Factors` on `ts.TestUser` instead of fetching it from the DB via `models.FindFactorsByUserID` Tests with multiple cases were left untouched as they have interleaving interactions in some cases --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for d405ffd - Browse repository at this point
Copy the full SHA d405ffdView commit details -
refactor: centralize generateAccessToken for user tests (supabase#1334)
## What kind of change does this PR introduce? Similar to supabase#1333 we centralize the setup around `generateAccessToken` Co-authored-by: joel@joellee.org <joel@joellee.org>
Configuration menu - View commit details
-
Copy full SHA for 4254873 - Browse repository at this point
Copy the full SHA 4254873View commit details
Commits on Dec 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c4665e4 - Browse repository at this point
Copy the full SHA c4665e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d96c9d - Browse repository at this point
Copy the full SHA 0d96c9dView commit details