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

    07/16/2021, 4:54 AM
    It would be printed out on the browser console
  • r

    rp

    07/16/2021, 4:54 AM
    You may have to click on some “see more” option or something
  • r

    rp

    07/16/2021, 5:00 AM
    @raviagheda I’d be happy to get on a call as well to help debug.
  • n

    nim4ze

    07/16/2021, 2:48 PM
    Hey guys, how can I restyle the password reset form without having to enable email verification for all account creations? I found this in the docs: https://supertokens.io/docs/thirdpartyemailpassword/common-customizations/email-verification/embed-in-page , but am wondering how to activate the custom page for password reset. Thanks!
  • r

    rp

    07/16/2021, 2:49 PM
    Have you seen this: https://supertokens.io/docs/thirdpartyemailpassword/common-customizations/reset-password/embed-in-page?
  • n

    nim4ze

    07/16/2021, 3:09 PM
    Thanks! Does that mean i can't use
    EmailPassword.init(....
    but have to use
    ThirdPartyEmailPassword.init(...
    in the frontend?
  • n

    nim4ze

    07/16/2021, 3:17 PM
    So for example:
    typescript
    import EmailPassword, { EmailPasswordAuth } from "supertokens-auth-react/recipe/emailpassword";
    import ThirdPartyEmailPassword from 'supertokens-auth-react/recipe/thirdpartyemailpassword';
    import Session from "supertokens-auth-react/recipe/session";
    import Header from "./Header";
    import SignInForm from './components/SignInForm';
    import PasswordResetPage from './components/PasswordResetPage';
    
    ...
    
      recipeList: [
        ThirdPartyEmailPassword.init({
          resetPasswordUsingTokenFeature: {
            disableDefaultImplementation: true,
          },
        }),
        EmailPassword.init({
          resetPasswordUsingTokenFeature: {
            disableDefaultImplementation: true,
          },
          useShadowDom: false,
  • r

    rp

    07/16/2021, 3:18 PM
    @nim4ze you should not combine recipes
  • r

    rp

    07/16/2021, 3:18 PM
    If you are using emailpassword, use that
  • r

    rp

    07/16/2021, 3:19 PM
    EmailPassword also has the same feature: https://supertokens.io/docs/emailpassword/common-customizations/reset-password/embed-in-page
  • r

    rp

    07/16/2021, 3:19 PM
    So you don't need to use thirdpartyemailpassword.
  • n

    nim4ze

    07/16/2021, 3:19 PM
    and then in the `PasswordResetPage.tsx`:
    typescript
    import React from 'react';
    import { ResetPasswordUsingToken } from 'supertokens-auth-react/recipe/thirdpartyemailpassword';
    ...
    class PasswordResetPage extends React.Component<any, HeaderState>{
    ...
      render() {
    return() {
    <div>
            <ResetPasswordUsingToken />
    </dev>}
  • r

    rp

    07/16/2021, 3:20 PM
    You should import from emailpassword and remove the
    ThirdPartyEmailPassword.init
  • r

    rp

    07/16/2021, 3:20 PM
    See this: https://supertokens.io/docs/emailpassword/common-customizations/reset-password/embed-in-page
  • n

    nim4ze

    07/16/2021, 3:21 PM
    okay - tried that --> the sign in page will appear upon password reset
  • n

    nim4ze

    07/16/2021, 3:21 PM
    perhaps the error is somewhere else
  • r

    rp

    07/16/2021, 3:22 PM
    what route have you added the
    ResetPasswordUsingToken
    to?
  • n

    nim4ze

    07/16/2021, 3:22 PM
    ah, which route should that page be added to?
  • r

    rp

    07/16/2021, 3:23 PM
    by default is it
    /auth/reset-password
    . But since you have disabled the default impl, you can add it to that or any other route..
  • n

    nim4ze

    07/16/2021, 3:23 PM
    okay so i have the custom component, and add that to e.g. the same route? let me try
  • r

    rp

    07/16/2021, 3:24 PM
    yea.. same route will be easier.. otherwise you will have to add additional config to tell SuperTokens about a diff route.
  • n

    nim4ze

    07/16/2021, 3:26 PM
    soo like this?
    typescript
         <Router>
            <Switch>
              {getSuperTokensRoutesForReactRouterDom(require("react-router-dom"))}
              <Route path="/auth/reset-password">
                <PasswordResetPage />
              </Route>
              <Route path="/auth">
                <EmailPasswordAuth requireAuth={false}>
                  <SignInForm />
                </EmailPasswordAuth>
              </Route>
              <Route path="/">
                <EmailPasswordAuth>
                  <App />
                </EmailPasswordAuth>
              </Route>
            </Switch>
          </Router>
  • r

    rp

    07/16/2021, 3:27 PM
    Yea.. Maybe you don't need
    <EmailPasswordAuth requireAuth={false}>
    around the
    <SignInForm />
    component.
  • n

    nim4ze

    07/16/2021, 3:36 PM
    appears to work, thanks!
  • r

    raviagheda

    07/16/2021, 5:10 PM
    message has been deleted
  • r

    rp

    07/16/2021, 5:12 PM
    Did you call supertokens.init?
  • r

    rp

    07/16/2021, 5:12 PM
    On the frontend
  • r

    raviagheda

    07/16/2021, 5:13 PM
    Sure, thanks, BTW it's related to process is undefiend under addState function, which can be handle by updating process variable under processState js
  • r

    raviagheda

    07/16/2021, 5:13 PM
    yes...
  • r

    rp

    07/16/2021, 5:14 PM
    It's strange cause the code is:
    if (process !== undefined && process.env !== undefined && process.env.TEST_MODE === "testing") {...}
Powered by Linen
Title
r

rp

07/16/2021, 5:14 PM
It's strange cause the code is:
if (process !== undefined && process.env !== undefined && process.env.TEST_MODE === "testing") {...}
View count: 2