discourse/app/assets/javascripts
Rafael dos Santos Silva 2278c7f82d
FIX: Bypass service worker on the SSO path (#15558)
This is a workaround a behavior change in Chromium v97.
The following text was sent to the blink-dev mailing list:

> This change broke a SingleSignOn login on the FOSS software Discourse. We have a flow like:
>
> 1. User visits forum.siteA.com, click login
> 2. Gets redirected to idp.siteB.com
> 3. Fills login details
> 4. Gets redirected to forum.siteA.com/session/sso_login?parameters
> 5. Gets redirected to forum.siteA.com/homepage
>
> On step 4, the response includes a `set-cookie` header, with proper `HttpOnly; SameSite=Lax; Secure `and set. But if there is an active service worker, the login will fail as that cookie will be rejected by Chromium due to SameSite rules now.
>
> t=2971 [st=258]        COOKIE_INCLUSION_STATUS
>                        --> domain = "forum.siteA.com"
>                        --> name = "_t"
>                        --> operation = "store"
>                        --> path = "/"
>                        --> status = "EXCLUDE_SAMESITE_LAX, DO_NOT_WARN"
>
> The service worker is a vanilla WorkboxJS service worker that intercepts all GETs with the "Network First" strategy.
>
> Disabling the service worker or using Firefox results in a successful login. There is no warning in either DevTools network tab nor the console that the cookie was rejected.
>
> Chrome 96: login works
> Chrome 97: login does not work
> Chrome 98: login does not work
>
> Is this expected behavior? Even if the request `GET forum.siteA.com` was initiated because of a redirect from a different domain, is it expected that Chrome will silently drop same site cookies from forum.siteA.com?
2022-01-12 20:01:53 -03:00
..
admin FEATURE: Search screened IP address in blocks (#15461) 2022-01-11 09:16:51 +02:00
confirm-new-email
discourse FIX: navigate to topic/PM regardless of Shift key press (#15551) 2022-01-13 08:13:33 +11:00
discourse-common DEV: Support for running theme test with Ember CLI (second attempt) 2022-01-12 15:43:29 -05:00
discourse-hbr DEV: Re-allow node 17, with a warning (#15083) 2021-11-24 21:16:33 +01:00
discourse-widget-hbs DEV: Re-allow node 17, with a warning (#15083) 2021-11-24 21:16:33 +01:00
docs
ember-addons
locales DEV: Add count to missing translation strings (#15509) 2022-01-09 23:10:32 +01:00
pretty-text DEV: Allow utility class domFromString to take in strings with multiple top level elements (#15548) 2022-01-12 19:49:24 +08:00
select-kit FEATURE: decorate username in email-group-user-chooser-row 2022-01-11 09:49:27 +08:00
truth-helpers DEV: Re-allow node 17, with a warning (#15083) 2021-11-24 21:16:33 +01:00
wizard DEV: Refactor animation for invalid inputs in wizard (#15334) 2021-12-16 17:17:36 -05:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
activate-account.js
admin.js.erb
app-boot.js
application.js DEV: Make `screen-track` a regular service (#14983) 2021-11-17 20:56:06 +01:00
auto-redirect.js
browser-detect.js FIX: Feature detect globalThis (#14410) 2021-09-22 11:39:41 -03:00
browser-update.js FIX: browser-update should work with old browsers (#12436) 2021-03-18 19:09:01 +02:00
discourse-loader.js Revert "A11Y: Improve create account modal for screen readers (#14204)" (#14233) 2021-09-03 09:42:56 +10:00
discourse-shims.js FEATURE: Local chunked uppy backup uploads with a new uploader plugin (#14894) 2021-11-23 08:45:42 +10:00
embed-application.js
ember_include.js.erb DEV: Support for running theme test with Ember CLI (second attempt) 2022-01-12 15:43:29 -05:00
ember_jquery.js
env.js
google-tag-manager.js FEATURE: Implement nonces for Google Tag Manager integration (#12531) 2021-03-26 11:19:31 -04:00
google-universal-analytics-v3.js
google-universal-analytics-v4.js
handlebars-shim.js
main_include_admin.js DEV: Remove old backup uploader and resumable.js (#15365) 2021-12-21 15:02:10 +10:00
markdown-it-bundle.js
onpopstate-handler.js
package.json FIX: Make truth-helpers work in Ember CLI (#13044) 2021-05-12 17:52:36 +02:00
polyfills.js DEV: Remove iOS 9.3 polyfills (#15343) 2021-12-17 02:47:13 +01:00
pretty-text-bundle.js
print-page.js
service-worker.js.erb FIX: Bypass service worker on the SSO path (#15558) 2022-01-12 20:01:53 -03:00
set-prototype-polyfill.js
start-discourse.js DEV: Avoid using globals (#14909) 2021-11-13 13:10:13 +01:00
template_include.js
test-shims.js
vendor-common.js DEV: Support for running theme test with Ember CLI (second attempt) 2022-01-12 15:43:29 -05:00
vendor-theme-tests.js DEV: Support for running theme test with Ember CLI (second attempt) 2022-01-12 15:43:29 -05:00
vendor.js DEV: Support for running theme test with Ember CLI (second attempt) 2022-01-12 15:43:29 -05:00
widget-runtime.js
wizard-application.js DEV: implements some of ember-truth-helpers (#12667) 2021-04-12 11:40:00 +02:00
wizard-shims.js DEV: Use Uppy in wizard-field-image uploads (#15269) 2021-12-13 15:23:44 +10:00
wizard-start.js
wizard-vendor.js DEV: Drop jQuery file uploader and old upload components (#15376) 2021-12-22 08:59:44 +10:00
yarn.lock DEV: Support for running theme test with Ember CLI (second attempt) 2022-01-12 15:43:29 -05:00