Hello everyone,
I am trying to integrate auth into my nuxt 4 frontend using sdk (nuxt/medusa); initially didn't understand the auth flow to creating an account so tried to sign up with a few emails while I was unknowingly creating auth tokens by caling sdk.auth.register. When I finally realized I was supposed to make a second call to sdk.store.customer.create passing in the auth token from earlier into the headers. I kept getting Identity with email already exists.
Even when I finally realized what was going on and was able to create accounts, I still get thesame message when I delete an account and try to sign up with same email.
My questions are:
- How do i resolve the above issues?
- What would be the optimal way to integrate auth into my nuxt 4 frontend? I am new to vue/nuxt and have a feeling my current approach is
hacky-- pinia store/local storage with route middleware .
Thank you in advance.