In ProgressiveProfiling, the TPA query fired even when
registrationEmbedded was false and the result was ignored. Added an
enabled option to useThirdPartyAuthHook and set it to
registrationEmbedded in ProgressiveProfiling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
It was being called on every data sync effect run, causing a flash of
PENDING state even when TPA data was already available.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The query key only included pageId, so if the payload (tpa_hint, query
params, etc.) changed while pageId stayed the same, React Query would
serve stale cached data.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The TPA context is effectively static per session. Adding a 5-minute
staleTime prevents unnecessary background refetches when navigating
between login/register tabs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LoginContext setFormFields/setErrors are useState setters that accept
updater functions, so their types should be Dispatch<SetStateAction<...>>
rather than plain function signatures.
PASSWORD_RESET_ERROR was checked in ResetPasswordPage but no code path
ever set status to that value, making the conditions dead code.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When shouldRedirect was true and welcomePageContext.nextUrl was truthy,
both RedirectLogistration components rendered simultaneously, causing a
double redirect attempt. The first block was a subset of the second, so
removing it is sufficient.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
validateInput was directly mutating the formErrors state object and
then spreading it. When handleSubmit called validateInput twice in
succession, the second call operated on stale closure values because
React batches state updates. Also fixed handleOnFocus for the same
issue.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Calling navigate() during the render phase triggers state updates in
the router, causing React warnings and potential infinite render loops
in strict mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The function expects two string arguments (suggestion, type) but was
being called with a single object, corrupting the email suggestion state.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Redux + Redux-Saga with React Query (useMutation/useQuery) for
server state and React Context for UI/form state across all modules:
login, registration, forgot-password, reset-password, progressive-
profiling, and common-components.
Port of master commits 0d709d15 and 93bd0f24, adapted for
@openedx/frontend-base:
- getSiteConfig() instead of getConfig()
- useAppConfig() for per-app configuration
- @tanstack/react-query as peerDependency (shell provides QueryClient)
- CurrentAppProvider instead of AppProvider
Also fixes EnvironmentTypes circular dependency in site.config.test.tsx
by using string literal instead of enum import.
Co-Authored-By: Jesus Balderrama <jesus.balderrama.wgu@gmail.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This change adds a Slot for the login page allowing it to be customised.
Since this touched the Login Page, LoginPage and Logistration have also
been refactored to move away from redux connect.
Adapted for frontend-base: uses Slot from @openedx/frontend-base instead
of PluginSlot from @openedx/frontend-plugin-framework, slot files live
under src/slots/, and the slot ID follows the frontend-base naming
convention (org.openedx.frontend.slot.authn.loginComponent.v1).
Co-Authored-By: Adolfo R. Brandes <adolfo@axim.org>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Configure the package to compile TypeScript and copy SCSS files to dist/
before publishing, rather than publishing raw source files. This allows
us to use tsc-alias for @src imports.
Also use a more modern export map to decouple the internal file
structure from the package's API, and add a build step to CI.
BREAKING CHANGE: Consuming projects may need to update their imports or
SASS @use lines.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
An issue was found when using Node version 24.9 with the latest
package-lock (see #123), one not reproducible with versions 24.12 and
above. Add a warning that will be shown when running `npm ci`.