You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I decided to start learning MedusaJS small, namely: adding a field for the user’s date of birth on the front end during registration. Following the documentation, everything worked out fine for me, all other functions worked correctly, but one problem arose - after registration, it did not authorize me and did not transfer me to my personal account. I'll add screenshots of my code to this post. If anyone has any ideas on how to fix this, I would be very grateful to you, since I have not been able to solve this problem for three days now. Thanks in advance to everyone who cares <3
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi. I decided to start learning MedusaJS small, namely: adding a field for the user’s date of birth on the front end during registration. Following the documentation, everything worked out fine for me, all other functions worked correctly, but one problem arose - after registration, it did not authorize me and did not transfer me to my personal account. I'll add screenshots of my code to this post. If anyone has any ideas on how to fix this, I would be very grateful to you, since I have not been able to solve this problem for three days now. Thanks in advance to everyone who cares <3
P.S. My guess is that the request "http://localhost:9000/customers" does not contain "response cookies" and because of this the request "http://localhost:9000/me" does not work properly. How to fix this - no idea.
P.P.S. I am not a native speaker, so I could have made some mistakes, sorry if that happened.
File: "./services/customers.ts"
![image](https://private-user-images.githubusercontent.com/87130455/268122343-f7ab1129-139e-448f-8354-3480ca1c71aa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMjA4ODMsIm5iZiI6MTcyNDEyMDU4MywicGF0aCI6Ii84NzEzMDQ1NS8yNjgxMjIzNDMtZjdhYjExMjktMTM5ZS00NDhmLTgzNTQtMzQ4MGNhMWM3MWFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAyMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM2ZWJkMGJlZjA4ODMwMDdkNzdlYTYxNGRiZjkwNzg4ZWI4NzBmMmE1ZjNjMDQyMDdmYzkxNzQzMGVmMmFiNDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.8wmHTfWSUwUwyCOSYTa-OaKB1yxgJI5hAJ4JbWFXJrM)
File: "./api/routes/store/customers/create-customers.ts"
![image](https://private-user-images.githubusercontent.com/87130455/268122745-c75ec3f5-4eec-4b2a-993b-caa12ff14680.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMjA4ODMsIm5iZiI6MTcyNDEyMDU4MywicGF0aCI6Ii84NzEzMDQ1NS8yNjgxMjI3NDUtYzc1ZWMzZjUtNGVlYy00YjJhLTk5M2ItY2FhMTJmZjE0NjgwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAyMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJkMDc2ZjRlMWYyNTVlOGYyZjUyY2M5MTRlNmM4MjFkMmM4YTI4MzZlYmVjMDZlZDA5NGE0YzcyMDlkZGM4MGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.I4S6JiPoBEbSdTnZ-PW788wokH04_ko2w4tcd_jG6dg)
File: "./api/routes/store/customers/index.ts"
![image](https://private-user-images.githubusercontent.com/87130455/268122979-9db30eb7-efb0-4900-be0c-7489e9827eee.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMjA4ODMsIm5iZiI6MTcyNDEyMDU4MywicGF0aCI6Ii84NzEzMDQ1NS8yNjgxMjI5NzktOWRiMzBlYjctZWZiMC00OTAwLWJlMGMtNzQ4OWU5ODI3ZWVlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAyMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwMGYzNzc4ZDE3NTU5NDgxNzYxM2I5ZWU5MjBmNTk3ZDcxMmFlN2EyNTZjMDc2NmQ3Zjg3MTk1ZTVmNGMwZTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.BX9Qu6oG88UxXpDqAXjii7MmLFPbsLDP6Lacl5rPHVk)
P.S. router.use(middlewares.authenticateCustomer()) - router.use(middleware.authenticate Customer()) to change data, ignore
File: "./api/routes/store/index.ts"
![image](https://private-user-images.githubusercontent.com/87130455/268123981-e2892bc7-14ec-4245-a019-622796ee5dfb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMjA4ODMsIm5iZiI6MTcyNDEyMDU4MywicGF0aCI6Ii84NzEzMDQ1NS8yNjgxMjM5ODEtZTI4OTJiYzctMTRlYy00MjQ1LWEwMTktNjIyNzk2ZWU1ZGZiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAyMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEwNjYxNzZkZmZhZmI0ZmZmMmI4YTUwNGU4ZmQ2MDhhZjYwOTIwNTNlNDY5YWZjYjg4NTQyNGU4YmU2ZjViNGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vV7ivUuCcF8dzPaHMzELpPi_Px-J7kD_yFRzq7spv9w)
File: "./api/index.ts"
![image](https://private-user-images.githubusercontent.com/87130455/268124051-c4b0e2ee-dce3-4fe6-bb06-58ab153d436a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMjA4ODMsIm5iZiI6MTcyNDEyMDU4MywicGF0aCI6Ii84NzEzMDQ1NS8yNjgxMjQwNTEtYzRiMGUyZWUtZGNlMy00ZmU2LWJiMDYtNThhYjE1M2Q0MzZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAyMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ1MWM3ZDQ5ODg5NjU1MzM0M2I3OTgwN2VlNjRkMjFhMjc1YWVjYTM4Mzg1ODdiZWUyOWFmOWJmNDlmODY3OGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._xNRVRqAEjGRJUX9qHGLCUZPyLVcB7dLAEHgTBkCJR0)
The problem might be this
![image](https://private-user-images.githubusercontent.com/87130455/268124243-201ed73f-e6aa-43b2-9d6a-31172cd82cae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMjA4ODMsIm5iZiI6MTcyNDEyMDU4MywicGF0aCI6Ii84NzEzMDQ1NS8yNjgxMjQyNDMtMjAxZWQ3M2YtZTZhYS00M2IyLTlkNmEtMzExNzJjZDgyY2FlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAyMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYzN2JiODc2ZGM5MTAwZWVjYzE5YzNlOTQ0M2JhMDgxMzdkYzU4M2Q1YjNiMmQ5Nzg2OGUxZDhlZmJlNzAyODMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KvCEVbF097G-CcVWGxMk2667TcscKmDBYUEANMfaB0A)
Screenshot of the request, no changes:
Screenshot of the current request:
![image](https://private-user-images.githubusercontent.com/87130455/268124545-8016e3cc-63db-451e-95bf-78ee6901d03b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMjA4ODMsIm5iZiI6MTcyNDEyMDU4MywicGF0aCI6Ii84NzEzMDQ1NS8yNjgxMjQ1NDUtODAxNmUzY2MtNjNkYi00NTFlLTk1YmYtNzhlZTY5MDFkMDNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDAyMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI4OGRhMWY4NDQ1YmFiZDU5ODRiZTQ1OTkzZDlhMTA4Y2Y4OGI3ZDhmOWQyNTZiZmI4OTRlMDI3MjllMjkzZmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ptcmXlLXcPU3KbWaHFQH3j38GeFxeoCQiX6hSvAQarE)
Beta Was this translation helpful? Give feedback.
All reactions