dosubot[bot] commented on issue #34552:
URL: https://github.com/apache/superset/issues/34552#issuecomment-3154989283
<!-- Answer -->
You're correct—the OAuth login links in the Login page are currently
generated as `/login/${provider.name}` and do not include the
`SUPERSET_APP_ROOT` prefix, which breaks the links when Superset is deployed
under a subpath. This is a known gap: the frontend has a utility function,
`ensureAppRoot`, specifically designed to prepend the application root to URLs,
but it's not used for these OAuth login links yet. This pattern is already used
elsewhere in the codebase for correct routing with `SUPERSET_APP_ROOT` set
([see
code](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/pages/Login/index.tsx),
[ensureAppRoot
utility](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/utils/pathUtils.ts)).
There are several open issues and discussions about incomplete handling of
`SUPERSET_APP_ROOT` in the frontend, and it's still considered BETA with known
limitations—some links and endpoints remain hardcoded and don't respect the app
root, including OAuth login links
([discussion](https://github.com/apache/superset/discussions/33414),
[issue](https://github.com/apache/superset/issues/33353)). A recent PR improved
login redirect handling to include the app root in some places, but it doesn't
fix the OAuth login button hrefs on the Login page ([PR
#34395](https://github.com/apache/superset/pull/34395)).
The recommended pattern is to use `ensureAppRoot(`/login/${provider.name}`)`
when generating these links. Until this is adopted in the Login page, OAuth
login links will remain broken under a non-root app deployment.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do?
[Good](https://app.dosu.dev/response-feedback/2be38399-d0d8-453a-bc2e-28043c260195?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/2be38399-d0d8-453a-bc2e-28043c260195?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/2be38399-d0d8-453a-bc2e-28043c260195?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/2be38399-d0d8-453a-bc2e-28043c260195?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/2be38399-d0d8-453a-bc2e-28043c260195?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/2be38399-d0d8-453a-bc2e-28043c260195?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/2be38399-d0d8-453a-bc2e-28043c260195?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34552)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]