rp
06/28/2021, 7:48 AMrp
06/28/2021, 7:50 AMnim4ze
06/28/2021, 8:13 AMnim4ze
06/28/2021, 5:40 PMrp
06/28/2021, 5:41 PMnim4ze
06/28/2021, 5:44 PMrp
06/28/2021, 5:44 PMrp
06/28/2021, 5:46 PMEmailPasswordAuth
component?rp
06/28/2021, 5:47 PMnim4ze
06/29/2021, 2:46 PM/auth?rid=emailpassword&redirectToPath=%2F
to the domain. As this is in the URL, when a user then refreshes the page a 404 page is shown. Is there a way to turn off the automatic appending of the parameters?rp
06/29/2021, 2:47 PMrp
06/29/2021, 2:48 PMrp
06/29/2021, 4:43 PMindex.html
file regardless of which path the user visits via their browser. Hope this solves your issue :))user
06/30/2021, 8:53 AMSuperTokens
from supertokens-auth-react
?
In docs there exists one for ThirdPartyEmailPassword
https://supertokens.io/docs/thirdpartyemailpassword/advanced-customizations/react-component-override/usage
But the same override
didn't work for SuperTokens.init(...)
rp
06/30/2021, 8:54 AMuser
06/30/2021, 8:55 AMSuperTokens.init({
appInfo: {
// learn more about this on https://supertokens.io/docs/thirdpartyemailpassword/appinfo
appName: "S",
apiDomain: END_POINT,
websiteDomain: window.location.href,
apiBasePath: "/api/auth",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [],
},
onHandleEvent: async (context) => {
if (context.action === "SUCCESS") {
store.dispatch(getProfilesFromDb);
}
},
override: {
components: {
SignInHeader: (OriginalComponent) => (originalProps) => {
console.log("signinheader")
return (
<div>
<h1> text1</h1>
<img src="https://s.ai/logo_full.svg" />
<OriginalComponent {...originalProps} />
</div>
);
},
EmailPasswordSignIn: (OriginalComponent) => (originalProps) => {
return (
<div>
<h1>text2</h1>
<OriginalComponent {...originalProps} />
</div>
);
},
}
}
}),
Session.init(),
],
});
user
06/30/2021, 8:58 AMrp
06/30/2021, 9:03 AMrp
06/30/2021, 9:16 AMThirdPartyEmailPassword.init({
signInAndUpFeature: {
style: {
headerTitle: { display: "none" }
},
...
},
override: {
components: {
ThirdPartyEmailPasswordHeader: (OriginalComponent) => (originalProps) => {
return (
<div>
<h1>text1</h1>
<img src="https://s.ai/logo_full.svg" />
<OriginalComponent {...originalProps} />
</div>
);
}
}
}
}
- You need to override ThirdPartyEmailPasswordHeader
component (which will affect the sign in and sign up pages.
- You need to hide the current title by using headerTitle: { display: "none" }
as seen above.user
06/30/2021, 9:18 AMrp
06/30/2021, 9:19 AMoriginalProps.isSignUp
booleansahil-shubham
06/30/2021, 9:26 AMrp
06/30/2021, 9:26 AMrp
06/30/2021, 9:27 AMrp
06/30/2021, 9:28 AMuser
06/30/2021, 6:38 PMheaderTitle: { display: "none" }
works well
But in override, we tried changing the components like SignInHeader
, EmailPasswordSignIn
. But nothing workedrp
06/30/2021, 8:05 PMrp
06/30/2021, 8:06 PMsahil-shubham
07/01/2021, 4:05 AMsahil-shubham
07/01/2021, 4:05 AMsahil-shubham
07/01/2021, 4:05 AM