I am trying to implement Supetoken for passwordless and social login in Own custom UI in React and express Web App. And i am stuck with the same issue from past 3 days
https://supertokens.com/docs/thirdpartypasswordless/custom-ui/securing-routes
seems like its a bug in documentation.
My Concern : in the above pic it is mentioned that we can use this function to protect our route. But it still expose UI of my private Route for some micro Second until the UseEffect donw its work.
My Expectation:
There should be a Method in which we can validate User session without using middleware.
The method which are available
https://supertokens.com/docs/thirdpartypasswordless/common-customizations/sessions/protecting-frontend-routes
Eg. import { SuperTokensWrapper } from "supertokens-auth-react";
import { SessionAuth } from "supertokens-auth-react/recipe/session"
are not working with my thirdpartypasswordless method explained in Documentation
in Documentation all the module are getting imported from supertokens-web-js path but as you can see above its importing from supertokens-auth-react. So it giving error in UI
Note; Please help me out if someone has implemented this
https://supertokens.com/docs/thirdpartypasswordless/custom-ui/securing-routes
in its React and Express app.
Otherwise my company will fire me 🔥 😢 ðŸ˜