rp
02/16/2021, 1:38 PMuser
02/18/2021, 9:39 AMuser
02/18/2021, 9:39 AMrp
02/18/2021, 9:39 AMrp
02/18/2021, 9:40 AMrp
02/18/2021, 9:40 AMrp
02/18/2021, 9:41 AMuser
02/18/2021, 9:48 AMrp
02/18/2021, 9:49 AMuser
02/18/2021, 9:49 AMuser
02/18/2021, 9:49 AMsupertokens-node
and supertokens-auth-react
to the latest versionsuser
02/18/2021, 9:49 AMuser
02/18/2021, 9:50 AMrp
02/18/2021, 9:50 AMuser
02/18/2021, 9:50 AMrp
02/18/2021, 9:51 AMuser
02/18/2021, 9:55 AMrp
02/18/2021, 9:55 AMuser
02/18/2021, 10:02 AMuser
02/18/2021, 10:02 AMrp
02/18/2021, 10:04 AMkevin.a
02/18/2021, 10:05 AMuser
02/18/2021, 10:07 AMkevin.a
02/18/2021, 10:11 AMSuperTokens.init
, I think you have customized styles already ? @Useruser
02/18/2021, 10:13 AMts
const STYLE_OVERRIDES: Record<string, CSSObject> = {
container: {
borderRadius: '0',
margin: '0',
boxSizing: 'border-box',
boxShadow: '0px 2px 32px rgba(0, 0, 0, 0.05)',
fontFamily: 'Nunito Sans',
padding: '0px 48px',
},
row: {
width: '100%',
headerTitle: {
letterSpacing: 'default',
},
secondaryText: {
letterSpacing: 'default',
},
},
input: {
boxSizing: 'border-box',
height: '48px',
width: '100%',
margin: '0',
transition: 'all 0.07s ease-out',
borderRadius: '0',
border: '2px solid transparent',
fontFamily: 'Nunito Sans',
font: '400 16px Nunito Sans',
letterSpacing: 'default',
boxShadow: '0px 2px 10px rgba(0, 0, 0, 0.1)',
fontSize: '16px',
':hover': {
border: '2px solid #8E959E',
},
':focus': {
border: '2px solid #1D2126',
},
},
button: {
boxSizing: 'border-box',
height: '48px',
boxShadow: '0px 4px 12px rgba(0, 0, 0, 0.15)',
borderRadius: '0',
fontFamily: 'Nunito Sans',
transition: 'all 0.12s ease-out',
fontSize: '16px',
padding: 'none',
':hover': {
transform: 'translateY(-4px)',
},
},
};
export default {
appInfo: {
appName: 'codusk-app',
apiDomain: apiUrl,
websiteDomain: websiteUrl,
apiBasePath: 'api/auth',
},
recipeList: [
// eslint-disable-next-line
// @ts-ignore
EmailPassword.init({
palette: {
primary: '#0A2B4C',
inputBackground: '#fff',
textLink: '#5986B2',
},
signInAndUpFeature: {
onSuccessRedirectURL: 'feed',
signUpForm: {
style: STYLE_OVERRIDES,
},
signInForm: {
style: STYLE_OVERRIDES,
},
},
resetPasswordUsingTokenFeature: {
submitNewPasswordForm: {
style: STYLE_OVERRIDES,
},
enterEmailForm: {
style: STYLE_OVERRIDES,
},
},
}),
Session.init()
],
};
user
02/18/2021, 10:13 AMSupertokens.init()
kevin.a
02/18/2021, 10:17 AMconst STYLE_OVERRIDES: Record<string, CSSObject> = {
container: {
borderRadius: '0',
margin: '0',
boxSizing: 'border-box',
boxShadow: '0px 2px 32px rgba(0, 0, 0, 0.05)',
fontFamily: 'Nunito Sans',
padding: '0px 48px',
},
row: {
width: '100%',
headerTitle: {
letterSpacing: 'default',
},
secondaryText: {
letterSpacing: 'default',
},
},
inputAdornment: {
display: "none"
},
inputWrapper: {
boxSizing: 'border-box',
height: '48px',
width: '100%',
margin: '0',
transition: 'all 0.07s ease-out',
borderRadius: '0',
border: '2px solid transparent',
fontFamily: 'Nunito Sans',
font: '400 16px Nunito Sans',
letterSpacing: 'default',
boxShadow: '0px 2px 10px rgba(0, 0, 0, 0.1)',
fontSize: '16px',
"&:focus-within": {
border: '2px solid #8E959E',
boxShadow: "none"
},
':hover': {
boxShadow: "none"
},
':focus': {
border: '2px solid #1D2126',
boxShadow: "none"
},
},
inputError: {
boxShadow: "none",
outline: "none",
"&:focus-within": {
boxShadow: "none",
outline: "none"
}
},
button: {
boxSizing: 'border-box',
height: '48px',
boxShadow: '0px 4px 12px rgba(0, 0, 0, 0.15)',
borderRadius: '0',
fontFamily: 'Nunito Sans',
transition: 'all 0.12s ease-out',
fontSize: '16px',
padding: 'none',
':hover': {
transform: 'translateY(-4px)',
},
},
};
kevin.a
02/18/2021, 10:20 AMEmailPassword.init({
signInAndUpFeature:{
onSuccessRedirectURL: 'feed',
(...)
}
}
with:
EmailPassword.init({
async getRedirectionURL(context) {
if (context.action === "SUCCESS") {
return "feed";
}
},
signInAndUpFeature: {
(...)
}
kevin.a
02/18/2021, 10:20 AMuser
02/18/2021, 10:45 AM