Skip to content

Commit f2862ef

Browse files
authored
fix: tpep header with disabled emailpassword (#770)
1 parent 09b9dda commit f2862ef

File tree

14 files changed

+48
-22
lines changed

14 files changed

+48
-22
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
77

8+
## [0.35.9] - 2023-12-06
9+
10+
- Fixes ThirdPartyEmailPassword rendering sign in/up switcher even with disabled email password. Instead it'll now render `SignInAndUpHeader` in this case (overrideable as `ThirdPartySignInAndUpHeader`)
11+
812
## [0.35.8] - 2023-11-26
913

1014
- Fixes `inputComponent` props to make them non optional. This is in the context of customizing the sign up form to add custom react components.

lib/build/recipe/emailpassword/components/themes/resetPasswordUsingToken/submitNewPassword.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/recipe/emailpassword/components/themes/signInAndUp/signIn.d.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/recipe/emailpassword/components/themes/signInAndUp/signUp.d.ts

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/recipe/thirdpartyemailpassword/components/themes/translations.d.ts

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/recipe/thirdpartypasswordless/components/themes/translations.d.ts

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/thirdparty-shared2.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/thirdpartyemailpasswordprebuiltui.js

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/build/version.d.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ts/recipe/thirdpartyemailpassword/components/themes/signInAndUp/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { SignUpFooter } from "../../../../emailpassword/components/themes/signIn
3030
import { SignUpForm } from "../../../../emailpassword/components/themes/signInAndUp/signUpForm";
3131
import { useDynamicLoginMethods } from "../../../../multitenancy/dynamicLoginMethodsContext";
3232
import { ProvidersForm } from "../../../../thirdparty/components/themes/signInAndUp/providersForm";
33+
import { SignInAndUpHeader } from "../../../../thirdparty/components/themes/signInAndUp/signInAndUpHeader";
3334
import { ThemeBase } from "../themeBase";
3435

3536
import { Header } from "./header";
@@ -62,10 +63,14 @@ const SignInAndUpTheme: React.FC<ThirdPartyEmailPasswordSignInAndUpThemeProps> =
6263
return (
6364
<div data-supertokens="container">
6465
<div data-supertokens="row">
65-
<Header
66-
isSignUp={props.epState.isSignUp}
67-
setIsSignUp={(isSignUp) => props.epDispatch({ type: isSignUp ? "setSignUp" : "setSignIn" })}
68-
/>
66+
{emailPasswordEnabled ? (
67+
<Header
68+
isSignUp={props.epState.isSignUp}
69+
setIsSignUp={(isSignUp) => props.epDispatch({ type: isSignUp ? "setSignUp" : "setSignIn" })}
70+
/>
71+
) : (
72+
<SignInAndUpHeader />
73+
)}
6974
{props.commonState.error && <GeneralError error={props.commonState.error} />}
7075
{props.tpChildProps !== undefined && thirdPartyEnabled && (
7176
<ProvidersForm {...props.tpChildProps} featureState={props.tpState} dispatch={props.tpDispatch} />

0 commit comments

Comments
 (0)