Why do i keep getting 401 Unauthorized error when trying to check if customer exist? #2715
-
Hey! I was trying to get on with Store API and faced a problem with authentication system. When i'm trying to create a new customer and login, everything goes fine i get response with status 200 and my customer JSON. But when after that i'm trying to check if this customer is authenticated it gives me 401 error. The code is as simple as possible: And in the same time i am able to access, for example, /store/customers/me/orders. endpoint I guess it means that i am authenticated isn't it? So is that some kind of a bug or it's just because of my both left hands? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @The-Solomon Thanks for reporting the issue 😄 it's a bug and not your configuration that's wrong This was an issue caused by the wrong auth-middleware was used and the issue has been addressed in a recent pr. The fix will be released with the next update. Here's the PR for the fix: #2687 For now you should be able to use |
Beta Was this translation helpful? Give feedback.
-
@pKorsholm |
Beta Was this translation helpful? Give feedback.
Hi @The-Solomon
Thanks for reporting the issue 😄 it's a bug and not your configuration that's wrong
This was an issue caused by the wrong auth-middleware was used and the issue has been addressed in a recent pr. The fix will be released with the next update. Here's the PR for the fix: #2687
For now you should be able to use
GET /store/customers/me
for the same functionality.