Is there examples of using supertokens with custom-ui on reactjs and nodejs express backend ? For some reason, I can get it to work with supertoken's pre built ui. But with custom-ui, keep running into CORs issue and having API calls (cancelled)
r
rp_st
10/31/2022, 6:10 AM
hey @vvaf. CORS setting should be the same for pre built or custom UI
rp_st
10/31/2022, 6:10 AM
But checkout the troubleshooting section for CORS related issue
rp_st
10/31/2022, 6:10 AM
also, please make sure that the apiDomain value is set correctly on the frontend
It is though...
using supertoken's pre-built ui I am able to login and logout http://localhost:3000/auth to http://localhost:3001/auth/signin
But in the same instance, when i go to http://localhost:3000/login with our custom ui. Even when i make an API call via fetch,axios or Emailpassword.signIn, it fails.
When i copy the failed request via browser Network console and run it, It works.
r
rp_st
10/31/2022, 6:26 AM
you should use the supertokens-web-js SDK instead of supertokens-auth-react SDK for custom UI
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).