medusajs / nextjs-starter-medusa

A performant frontend ecommerce starter template with Next.js 14 and Medusa.
https://next.medusajs.com/
MIT License
1.56k stars 423 forks source link

[Help Wanted] After registering on the registration page & after logging in on the login page, it does not take to the account page. #146

Open ike-keith opened 1 year ago

ike-keith commented 1 year ago

First of all, thank you all developers and contributors!

I deployed my storefront on Vercel following the official MedusaJS documentation.

When I tested it, I found that when I completed the registration on the registration page and logged in on the login page, it didn't take me to the account profile page or other pages, but it stayed on the registration page or the login page, as shown in the GIF below:

gif

Confirmed that the test user has completed registration in the database.

image

The corresponding log from the Medusa backend: (The IP address and storefront URL have been hidden.)

::ffff:ip.add.re.ss - - [19/Jul/2023:07:40:49 +0000] "GET /health HTTP/1.1" 200 2 "-" "ELB-HealthChecker/2.0"
::ffff:ip.add.re.ss - - [19/Jul/2023:07:40:49 +0000] "GET /health HTTP/1.1" 200 2 "-" "ELB-HealthChecker/2.0"
ip.add.re.ss - - [19/Jul/2023:07:40:54 +0000] "OPTIONS /store/customers HTTP/1.1" 204 0 "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:40:55 +0000] "POST /store/customers HTTP/1.1" 200 338 "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
info:    Processing customer.created which has 0 subscribers
ip.add.re.ss - - [19/Jul/2023:07:40:56 +0000] "GET /store/customers/me HTTP/1.1" 401 - "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:40:57 +0000] "GET /store/customers/me HTTP/1.1" 401 - "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:41:17 +0000] "OPTIONS /store/auth HTTP/1.1" 204 0 "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:41:18 +0000] "POST /store/auth HTTP/1.1" 200 327 "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:41:19 +0000] "GET /store/customers/me HTTP/1.1" 401 - "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
::ffff:ip.add.re.ss - - [19/Jul/2023:07:41:19 +0000] "GET /health HTTP/1.1" 200 2 "-" "ELB-HealthChecker/2.0"
::ffff:ip.add.re.ss - - [19/Jul/2023:07:41:19 +0000] "GET /health HTTP/1.1" 200 2 "-" "ELB-HealthChecker/2.0"
ip.add.re.ss - - [19/Jul/2023:07:41:20 +0000] "GET /store/customers/me HTTP/1.1" 401 - "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:41:26 +0000] "OPTIONS /store/auth HTTP/1.1" 204 0 "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:41:27 +0000] "POST /store/auth HTTP/1.1" 200 327 "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:41:27 +0000] "GET /store/customers/me HTTP/1.1" 401 - "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
ip.add.re.ss - - [19/Jul/2023:07:41:29 +0000] "GET /store/customers/me HTTP/1.1" 401 - "https://nextjs-starter-medusajs-mydomain.vercel.app/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
::ffff:ip.add.re.ss - - [19/Jul/2023:07:41:49 +0000] "GET /health HTTP/1.1" 200 2 "-" "ELB-HealthChecker/2.0"
::ffff:ip.add.re.ss - - [19/Jul/2023:07:41:49 +0000] "GET /health HTTP/1.1" 200 2 "-" "ELB-HealthChecker/2.0"

I don't know if the information below is helpful in figuring out what the problem is.

image image image

I'm not a developer and don't know how to solve it, so came here for some help or tips, thanks in advance!

ArnavK-09 commented 11 months ago

+1

uro commented 10 months ago

Het @ArnavK-09 do you still need help with this? I was affected by this issue and found it happened by my overridden endpoint. The team changed how we store the sessions from JWT to simple Customer ID. You can update to ^1.17.0, and this shouldn't occur anymore.

I think this issue can be closed now

ArnavK-09 commented 10 months ago

Het @ArnavK-09 do you still need help with this? I was affected by this issue and found it happened by my overridden endpoint. The team changed how we store the sessions from JWT to simple Customer ID. You can update to ^1.17.0, and this shouldn't occur anymore.

I think this issue can be closed now

I was talking about this error in the official demo! It's still not working

HeinKoZin commented 9 months ago

+1

stephanboersma commented 8 months ago

+1 on v1.19 of Medusa. Odd thing is that the issue only occurs on IOS chrome and safari.

Works fine on android and MacOS