Skip to content

fix(openapi): ship oauth2-redirect.js with swagger-ui assets#8261

Open
soyuka wants to merge 1 commit into
api-platform:4.3from
soyuka:fix/openapi-swagger-ui-oauth2-redirect-8243
Open

fix(openapi): ship oauth2-redirect.js with swagger-ui assets#8261
soyuka wants to merge 1 commit into
api-platform:4.3from
soyuka:fix/openapi-swagger-ui-oauth2-redirect-8243

Conversation

@soyuka
Copy link
Copy Markdown
Member

@soyuka soyuka commented Jun 8, 2026

Summary

  • Ships missing oauth2-redirect.js alongside oauth2-redirect.html in both src/Symfony/Bundle/Resources/public/swagger-ui/ and src/Laravel/public/swagger-ui/.
  • Patches update-js.sh so future dependency bumps keep the pair in sync.

Test plan

  • New PHPUnit guard tests/Symfony/Bundle/SwaggerUi/OAuth2RedirectAssetsTest.php asserts both files exist next to oauth2-redirect.html.
  • Failing test confirmed before fix; passing after.

Fixes #8243

The Swagger UI OAuth2 authorization code flow redirects to
oauth2-redirect.html which references oauth2-redirect.js. The latter
was missing from the published bundle/laravel asset folders because
update-js.sh did not copy it, breaking the OAuth2 login flow with a
404 on the JS file.

Ship oauth2-redirect.js alongside oauth2-redirect.html in both Symfony
bundle and Laravel public asset folders, and update update-js.sh so
future dependency bumps keep the pair in sync.

Fixes api-platform#8243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant