https://supertokens.com/ logo
Docs
Join the conversationJoin Discord
Channels
community
contributing
general
github-activity
info
introductions
new-releases
random
security
support-questions
welcome-0xdelusion
welcome-aj-ya
welcome-aleksandrc
welcome-alpinjs
welcome-amberlamps1
welcome-andrew-rodriguez
welcome-ankit-choudhary
welcome-anthony-stod-custodio
welcome-call-in
welcome-chwalbox
welcome-claybiokiller
welcome-co7e
welcome-cosmoecwsa
welcome-devdag
welcome-dinso
welcome-drebotelho
welcome-elio
welcome-ernest
welcome-foxbarrington
welcome-fromscratch
welcome-galto4ir
welcome-goetzum
welcome-hay-kot
welcome-himanshu-kukreja
welcome-hossambarakat
welcome-ichikawakazuto
welcome-jahir9991
welcome-jamesl
welcome-jerry123424
welcome-john-oliver
welcome-jonas-alexanderson
welcome-jxyz
welcome-kelvinwop
welcome-kraz
welcome-lancekey
welcome-leoo
welcome-lukeacollins
welcome-m-j-mon
welcome-malik-khoja
welcome-marco
welcome-mardadi
welcome-meshguy
welcome-metamorph
welcome-mike-tectu
welcome-mirzok
welcome-mozomig
welcome-naberyou66_
welcome-nacer
welcome-namratha
welcome-naveenkumar
welcome-nightlight
welcome-nischith
welcome-notankit
welcome-olawumi
welcome-pavan-kumar-reddy-n
welcome-pineappaul
welcome-poothebear
welcome-rick
welcome-samuel-qosenergy
welcome-samuelstroschein
welcome-shubhamgoel23
welcome-shubhamkaushal
welcome-sidebar
welcome-surajsli
welcome-suyash_
welcome-syntaxerror
welcome-tauno
welcome-tauno
welcome-tawnoz
welcome-teclali
welcome-tls
welcome-turbosepp
welcome-vikram_shadow
welcome-yann
Powered by Linen
support-questions
  • r

    rp

    02/18/2021, 9:40 AM
    You would also need to upgrade the core version to the latest one
  • r

    rp

    02/18/2021, 9:40 AM
    And a few changes to the db table structure
  • r

    rp

    02/18/2021, 9:41 AM
    The benefit of upgrading is that you would get social login as a feature if you want that. But if you don’t, I don’t see any need for you to upgrade it
  • u

    user

    02/18/2021, 9:48 AM
    Yeah I would prefer to have social login features
  • r

    rp

    02/18/2021, 9:49 AM
    Do you want social login and email password? Or just social login?
  • u

    user

    02/18/2021, 9:49 AM
    What's the difference?
  • u

    user

    02/18/2021, 9:49 AM
    I upgraded both
    supertokens-node
    and
    supertokens-auth-react
    to the latest versions
  • u

    user

    02/18/2021, 9:49 AM
    I haven't touched email verification myself but plan to
  • u

    user

    02/18/2021, 9:50 AM
    Is it included by default in the boilerplate code or is it something separate I need to add code to implement
  • r

    rp

    02/18/2021, 9:50 AM
    I mean do you want to show your users the ability to do social login or to create their own email password with you?
  • u

    user

    02/18/2021, 9:50 AM
    I want them to be able to sign up/sign in with either social login or with a regular email and password
  • r

    rp

    02/18/2021, 9:51 AM
    Got it. So wait for a week or so. We will launch that very soon with email verification etc.. then can take you through migration.
  • u

    user

    02/18/2021, 9:55 AM
    Awesome thanks Rishabh. You're the best
  • r

    rp

    02/18/2021, 9:55 AM
    Appreciate it!
  • u

    user

    02/18/2021, 10:02 AM
    Any way to quickly remove these shadows on these inputs?
  • u

    user

    02/18/2021, 10:02 AM
    + the extra styling such as the checkmark and eye for viewing hiding
  • r

    rp

    02/18/2021, 10:04 AM
    @kevin.a can help
  • k

    kevin.a

    02/18/2021, 10:05 AM
    Hey @User , let me take a look and I'll give you more info soon
  • u

    user

    02/18/2021, 10:07 AM
    Yeah it seems like these styles might have been added since the last time I used supertokens. I just upgraded my supertokens packages and noticed them
  • k

    kevin.a

    02/18/2021, 10:11 AM
    Can I see your
    SuperTokens.init
    , I think you have customized styles already ? @User
  • u

    user

    02/18/2021, 10:13 AM
    ts
    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()
      ],
    };
  • u

    user

    02/18/2021, 10:13 AM
    Then I pass this into my
    Supertokens.init()
  • k

    kevin.a

    02/18/2021, 10:17 AM
    Try this and let me know if that's what you expected.
    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',
        },
      },
      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)',
        },
      },
    };
  • k

    kevin.a

    02/18/2021, 10:20 AM
    you might also want to replace:
    EmailPassword.init({
      signInAndUpFeature:{
        onSuccessRedirectURL: 'feed',
        (...)
      }
    }
    with:
    EmailPassword.init({
       async getRedirectionURL(context) {
          if (context.action === "SUCCESS") {
            return "feed";
          }
        },
        signInAndUpFeature: {
          (...)
        }
  • k

    kevin.a

    02/18/2021, 10:20 AM
    @User ^
  • u

    user

    02/18/2021, 10:45 AM
    Thanks I’ll get this tomorrow. Appreciate it
  • u

    user

    02/18/2021, 11:16 AM
    I see why the new changes (the input error and adornments) messed up my old styles
  • u

    user

    02/18/2021, 11:16 AM
    I fixed it. We're good now
  • u

    user

    02/18/2021, 11:16 AM
    message has been deleted
  • k

    kevin.a

    02/18/2021, 11:37 AM
    Looking good!
Powered by Linen
Title
k

kevin.a

02/18/2021, 11:37 AM
Looking good!
View count: 2