Hi Friends ! I wanted to try the recipe for Session management with SuperTokens. I currently run ema...
k
Hi Friends ! I wanted to try the recipe for Session management with SuperTokens. I currently run email password login recipie, I want to change my backend node.js code to use session management. Is there an easy way ?
r
Hey!
So you want to stop using the emailpassword recipe and use only sessions? Or use both?
k
stop using email password
Hi rp
r
I see. You can just remove the emailpassword recipe from the init on the backend and frontend.
If you have existing users with their password hashes in the db, you can reuse them if you like
Why do you want to stop using that recipe?
k
I am running my code on VPN where email password access is blocked
is there as easy tutorial to do this ?
r
> I am running my code on VPN where email password access is blocked I don't understand. What exactly is the issue?
> is there as easy tutorial to do this ? Yes. https://supertokens.com/docs/session/introduction
k
I read through this. I am trying to find a recipe with session only for backend api using NodeJS .
r
This is the recipe for that.
k
Its hard for me understand session verification and adding it in Backend and Frontend. Is there as github template I can use ?
r
Not for just sessions, but we have for emailpassword + sessions.
if you follow the quick setup guide in the link above, it should work
k
I am trying but I am not able to get my backend API call setup corretly
r
What’s the error?
k
Copy code
function App() {
    let [showSessionExpiredPopup, updateShowSessionExpiredPopup] = useState(false);

    return (
        <div className="App">
            <SuperTokensWrapper>
            <Router>
                <div className="fill">
                    <Routes>

                        
                        <Route path="/" element={

                                    <Home />

                            }
                        />

                    </Routes>
                </div>
                <Footer />
            </Router>
            </SuperTokensWrapper>
        </div>
    );
}

export default App;
This code runs with no error but doesnt show home page. Its blank
Backend Code:
r
any errors on the browser console?
k
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
r
What’s the stack trace for this?