Auth0 is now connected to the backend and token-validation is possible, though I'm unsure if I'll need it in the final product. The frontend's apiClient is able to make calls to the backend to check if a user exists already, and if not to create the user.
That only gets called once the user's email has been verified, as a sort of mechanism to avoid always checking while a user is signed in (including unverified). I'm not sure if this is best practice though; I found this about adding things to the onboarding flow after sign up or first log in, but that's not the a big priority right now.
Issues:
The user history page is also protected, but locally localhost:3000/history properly redirects to the auth0-login page, whereas on Heroku scribblering-wip.com/history returns 404 (when user is not signed in).
Auth0 is now connected to the backend and token-validation is possible, though I'm unsure if I'll need it in the final product. The frontend's apiClient is able to make calls to the backend to check if a user exists already, and if not to create the user.
That only gets called once the user's email has been verified, as a sort of mechanism to avoid always checking while a user is signed in (including unverified). I'm not sure if this is best practice though; I found this about adding things to the onboarding flow after sign up or first log in, but that's not the a big priority right now.
Issues:
localhost:3000/history
properly redirects to the auth0-login page, whereas on Herokuscribblering-wip.com/history
returns404
(when user is not signed in).Live preview