get: operationId: GetAuth summary: Get Current Customer description: Retrieve the currently logged in Customer's details. x-authenticated: true x-codegen: method: getSession x-codeSamples: - lang: JavaScript label: JS Client source: $ref: ../code_samples/JavaScript/store_auth/get.js - lang: Shell label: cURL source: $ref: ../code_samples/Shell/store_auth/get.sh security: - cookie_auth: [] tags: - Auth responses: '200': description: OK content: application/json: schema: $ref: ../components/schemas/StoreAuthRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': $ref: ../components/responses/invalid_state_error.yaml '422': $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml post: operationId: PostAuth summary: Customer Login description: >- Log a customer in and includes the Cookie session in the response header. The cookie session can be used in subsequent requests to authenticate the customer. When using Medusa's JS or Medusa React clients, the cookie is automatically attached to subsequent requests. requestBody: content: application/json: schema: $ref: ../components/schemas/StorePostAuthReq.yaml x-codegen: method: authenticate x-codeSamples: - lang: JavaScript label: JS Client source: $ref: ../code_samples/JavaScript/store_auth/post.js - lang: Shell label: cURL source: $ref: ../code_samples/Shell/store_auth/post.sh tags: - Auth responses: '200': description: OK content: application/json: schema: $ref: ../components/schemas/StoreAuthRes.yaml '400': $ref: ../components/responses/400_error.yaml '401': $ref: ../components/responses/incorrect_credentials.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': $ref: ../components/responses/invalid_state_error.yaml '422': $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml delete: operationId: DeleteAuth summary: Customer Log out description: Delete the current session for the logged in customer. x-authenticated: true x-codegen: method: deleteSession x-codeSamples: - lang: Shell label: cURL source: $ref: ../code_samples/Shell/store_auth/delete.sh security: - cookie_auth: [] tags: - Auth responses: '200': description: OK '400': $ref: ../components/responses/400_error.yaml '401': $ref: ../components/responses/unauthorized.yaml '404': $ref: ../components/responses/not_found_error.yaml '409': $ref: ../components/responses/invalid_state_error.yaml '422': $ref: ../components/responses/invalid_request_error.yaml '500': $ref: ../components/responses/500_error.yaml