Don't fetch user details on login (#1909)
* Install sdk from commit * Don't include user details on login * Update recordings * Update saleor-sdk version * Update sdk version
This commit is contained in:
parent
6b2a34872b
commit
7576afed4e
6 changed files with 157 additions and 158 deletions
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -4850,9 +4850,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@saleor/sdk": {
|
"@saleor/sdk": {
|
||||||
"version": "0.4.2",
|
"version": "0.4.4",
|
||||||
"resolved": "https://registry.npmjs.org/@saleor/sdk/-/sdk-0.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/@saleor/sdk/-/sdk-0.4.4.tgz",
|
||||||
"integrity": "sha512-btA1Ro5tkJto4QVe+eskkZ6o6XQz8QYZluQgTS1EIOaUUmvB5N3ilKHQkTDB82xZkJFK+HMfqqraEetFeS9OBg==",
|
"integrity": "sha512-VQe4jQTZ4GSemQhgIETXf4Mt2Vy271H/MMwklhQISJWwVXqMPV6X892dOcAnqIvxexWbQQW43+4xKJVtRPFNCg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"cross-fetch": "^3.1.4",
|
"cross-fetch": "^3.1.4",
|
||||||
"jwt-decode": "^3.1.2"
|
"jwt-decode": "^3.1.2"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"@material-ui/lab": "^4.0.0-alpha.58",
|
"@material-ui/lab": "^4.0.0-alpha.58",
|
||||||
"@material-ui/styles": "^4.11.4",
|
"@material-ui/styles": "^4.11.4",
|
||||||
"@saleor/macaw-ui": "^0.3.3",
|
"@saleor/macaw-ui": "^0.3.3",
|
||||||
"@saleor/sdk": "^0.4.2",
|
"@saleor/sdk": "^0.4.4",
|
||||||
"@sentry/react": "^6.0.0",
|
"@sentry/react": "^6.0.0",
|
||||||
"@types/faker": "^5.1.6",
|
"@types/faker": "^5.1.6",
|
||||||
"@uiw/react-color-hue": "0.0.34",
|
"@uiw/react-color-hue": "0.0.34",
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
"creator": {
|
"creator": {
|
||||||
"comment": "persister:fs",
|
"comment": "persister:fs",
|
||||||
"name": "Polly.JS",
|
"name": "Polly.JS",
|
||||||
"version": "4.3.0"
|
"version": "5.1.0"
|
||||||
},
|
},
|
||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"_id": "2c067f705383db903cdaf88cb881c922",
|
"_id": "a1435ddf90b7742bd6534592ad110e86",
|
||||||
"_order": 0,
|
"_order": 0,
|
||||||
"cache": {},
|
"cache": {},
|
||||||
"request": {
|
"request": {
|
||||||
"bodySize": 1154,
|
"bodySize": 620,
|
||||||
"cookies": [],
|
"cookies": [],
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
{
|
{
|
||||||
"_fromType": "array",
|
"_fromType": "array",
|
||||||
"name": "content-length",
|
"name": "content-length",
|
||||||
"value": "1154"
|
"value": "620"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_fromType": "array",
|
"_fromType": "array",
|
||||||
|
@ -50,43 +50,41 @@
|
||||||
"value": "localhost:8000"
|
"value": "localhost:8000"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"headersSize": 255,
|
"headersSize": 254,
|
||||||
"httpVersion": "HTTP/1.1",
|
"httpVersion": "HTTP/1.1",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"postData": {
|
"postData": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"params": [],
|
"params": [],
|
||||||
"text": "{\"operationName\":\"login\",\"variables\":{\"email\":\"admin@example.com\",\"password\":\"admin\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment AddressFragment on Address {\\n id\\n firstName\\n lastName\\n companyName\\n streetAddress1\\n streetAddress2\\n city\\n cityArea\\n postalCode\\n country {\\n code\\n country\\n __typename\\n }\\n countryArea\\n phone\\n isDefaultBillingAddress\\n isDefaultShippingAddress\\n __typename\\n}\\n\\nfragment UserFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n metadata {\\n key\\n value\\n __typename\\n }\\n defaultShippingAddress {\\n ...AddressFragment\\n __typename\\n }\\n defaultBillingAddress {\\n ...AddressFragment\\n __typename\\n }\\n addresses {\\n ...AddressFragment\\n __typename\\n }\\n __typename\\n}\\n\\nmutation login($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}"
|
"text": "{\"operationName\":\"loginWithoutDetails\",\"variables\":{\"email\":\"admin@example.com\",\"password\":\"admin\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment UserBaseFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n __typename\\n}\\n\\nmutation loginWithoutDetails($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserBaseFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}"
|
||||||
},
|
},
|
||||||
"queryString": [],
|
"queryString": [],
|
||||||
"url": "http://localhost:8000/graphql/"
|
"url": "http://localhost:8000/graphql/"
|
||||||
},
|
},
|
||||||
"response": {
|
"response": {
|
||||||
"bodySize": 679,
|
"bodySize": 984,
|
||||||
"content": {
|
"content": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"size": 679,
|
"size": 984,
|
||||||
"text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": \"yDcn3nGgfW2AXuCc62pvaLGtL0dKs7n513jhL30DqmDirUDXL4zwEJYQfji8L2yP\", \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MzM5NTEwNzMsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjMzOTUxMzczLCJ0b2tlbiI6ImdtRU95YlM5TDhmaiIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IlZYTmxjam94IiwiaXNfc3RhZmYiOnRydWV9.hf105U1yvWzf-X_bKit4jh6vU_EnCC52XupS9GVlKaw\", \"errors\": [], \"user\": {\"id\": \"VXNlcjox\", \"email\": \"admin@example.com\", \"firstName\": \"\", \"lastName\": \"\", \"isStaff\": true, \"metadata\": [], \"defaultShippingAddress\": null, \"defaultBillingAddress\": null, \"addresses\": [], \"__typename\": \"User\"}, \"__typename\": \"CreateToken\"}}}"
|
"text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": \"0GedAMt3cXdGCfB9rqe7Tqc8ogIRYwvhWgpN2l4pXFOKcQDtXpczhD4CPDO4zV2d\", \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJpYXQiOjE2NDY4MjgwNDgsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjQ2ODI4MzQ4LCJ0b2tlbiI6IlBHSXN0dmFUS2xQcCIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoiYWNjZXNzIiwidXNlcl9pZCI6IlZYTmxjam95TVE9PSIsImlzX3N0YWZmIjp0cnVlfQ.NQPcXACGUynrPfhYA_aoP_afZonMMQbmy_DBGM57HArB1BPQZSJXMJ4ye27buRN1CnwuWhSBHJP6J7XjOdH7F2WzXTldaIbud5TCms00ANde9AdJnJ92zL1vTuB99-oHC8PqJRUTMMn4hetYosKOb9FEAS6tD4u529Do8YiVnxcsdGxPmfEaN5HiwJ4HE76lfZH2rU6uin9Vdk14dmJKF-Rr_P_efCckgkvNwr3GAyX7L9zeVeJeDR4W1jeUY-f05OQKx9_qZazpWBVk1558JX1kBu6wQ2kFCiCLuUcv0L13GanLesP-FCDwgntTCwNmFXdqTdADAXzYc8KpoScpfg\", \"errors\": [], \"user\": {\"id\": \"VXNlcjoyMQ==\", \"email\": \"admin@example.com\", \"firstName\": \"\", \"lastName\": \"\", \"isStaff\": true, \"__typename\": \"User\"}, \"__typename\": \"CreateToken\"}}, \"extensions\": {\"cost\": {\"requestedQueryCost\": 0, \"maximumAvailable\": 50000}}}"
|
||||||
},
|
},
|
||||||
"cookies": [
|
"cookies": [
|
||||||
{
|
{
|
||||||
"expires": "2021-11-10T11:17:53.000Z",
|
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
"maxAge": 2592000,
|
|
||||||
"name": "refreshToken",
|
"name": "refreshToken",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"sameSite": "Lax",
|
"sameSite": "Lax",
|
||||||
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MzM5NTEwNzMsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjM2NTQzMDczLCJ0b2tlbiI6ImdtRU95YlM5TDhmaiIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiJWWE5sY2pveCIsImlzX3N0YWZmIjp0cnVlLCJjc3JmVG9rZW4iOiJ5RGNuM25HZ2ZXMkFYdUNjNjJwdmFMR3RMMGRLczduNTEzamhMMzBEcW1EaXJVRFhMNHp3RUpZUWZqaThMMnlQIn0.zRkkzPiC8DPlBUvUPVcOSrEF4AzgDKcK8gpyQXSpKM4"
|
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJpYXQiOjE2NDY4MjgwNDgsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjQ5NDIwMDQ4LCJ0b2tlbiI6IlBHSXN0dmFUS2xQcCIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiJWWE5sY2pveU1RPT0iLCJpc19zdGFmZiI6dHJ1ZSwiY3NyZlRva2VuIjoiMEdlZEFNdDNjWGRHQ2ZCOXJxZTdUcWM4b2dJUll3dmhXZ3BOMmw0cFhGT0tjUUR0WHBjemhENENQRE80elYyZCJ9.eKJ4g02HziNjuKjxi_zEl5iz3EnrjzqWJjNYgVXxHMcXcJozOk5CrBpVFmM1ZUzdbXyPoHxW_UQeK0mVsMI9_owiYMfZcCyrOh1sDZB4oZVGA7Q_oYMLqc0Z81o_W-ZIN6Z3UNK4UKl7-1IRltJxVr4qmVtC7R5B_3Hnjs8xrEkcN0Q6sS0NyXYL9xVnazhDIRgrRQu4lU4co3eBCu0svyo7z5xESZmCRxsJZ1tfnoC-Gjx-6zO2hOFP4OrsbNWZcQhtoTDu5IbG8qthWI0eGvAkuK6jje0pnGrswuW_LlG1moBCy01C8K9WIYtYoT6BFnNMDc00W9MBNzGiN9rCXQ"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
"name": "date",
|
"name": "date",
|
||||||
"value": "Mon, 11 Oct 2021 11:17:53 GMT"
|
"value": "Wed, 09 Mar 2022 12:14:08 GMT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "server",
|
"name": "server",
|
||||||
"value": "WSGIServer/0.2 CPython/3.8.3"
|
"value": "WSGIServer/0.2 CPython/3.9.10"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "content-type",
|
"name": "content-type",
|
||||||
|
@ -94,7 +92,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "content-length",
|
"name": "content-length",
|
||||||
"value": "679"
|
"value": "984"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x-content-type-options",
|
"name": "x-content-type-options",
|
||||||
|
@ -107,17 +105,17 @@
|
||||||
{
|
{
|
||||||
"_fromType": "array",
|
"_fromType": "array",
|
||||||
"name": "set-cookie",
|
"name": "set-cookie",
|
||||||
"value": "refreshToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MzM5NTEwNzMsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjM2NTQzMDczLCJ0b2tlbiI6ImdtRU95YlM5TDhmaiIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiJWWE5sY2pveCIsImlzX3N0YWZmIjp0cnVlLCJjc3JmVG9rZW4iOiJ5RGNuM25HZ2ZXMkFYdUNjNjJwdmFMR3RMMGRLczduNTEzamhMMzBEcW1EaXJVRFhMNHp3RUpZUWZqaThMMnlQIn0.zRkkzPiC8DPlBUvUPVcOSrEF4AzgDKcK8gpyQXSpKM4; expires=Wed, 10 Nov 2021 11:17:53 GMT; HttpOnly; Max-Age=2592000; Path=/; SameSite=Lax"
|
"value": "refreshToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjEifQ.eyJpYXQiOjE2NDY4MjgwNDgsIm93bmVyIjoic2FsZW9yIiwiZXhwIjoxNjQ5NDIwMDQ4LCJ0b2tlbiI6IlBHSXN0dmFUS2xQcCIsImVtYWlsIjoiYWRtaW5AZXhhbXBsZS5jb20iLCJ0eXBlIjoicmVmcmVzaCIsInVzZXJfaWQiOiJWWE5sY2pveU1RPT0iLCJpc19zdGFmZiI6dHJ1ZSwiY3NyZlRva2VuIjoiMEdlZEFNdDNjWGRHQ2ZCOXJxZTdUcWM4b2dJUll3dmhXZ3BOMmw0cFhGT0tjUUR0WHBjemhENENQRE80elYyZCJ9.eKJ4g02HziNjuKjxi_zEl5iz3EnrjzqWJjNYgVXxHMcXcJozOk5CrBpVFmM1ZUzdbXyPoHxW_UQeK0mVsMI9_owiYMfZcCyrOh1sDZB4oZVGA7Q_oYMLqc0Z81o_W-ZIN6Z3UNK4UKl7-1IRltJxVr4qmVtC7R5B_3Hnjs8xrEkcN0Q6sS0NyXYL9xVnazhDIRgrRQu4lU4co3eBCu0svyo7z5xESZmCRxsJZ1tfnoC-Gjx-6zO2hOFP4OrsbNWZcQhtoTDu5IbG8qthWI0eGvAkuK6jje0pnGrswuW_LlG1moBCy01C8K9WIYtYoT6BFnNMDc00W9MBNzGiN9rCXQ; HttpOnly; Path=/; SameSite=Lax"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"headersSize": 704,
|
"headersSize": 967,
|
||||||
"httpVersion": "HTTP/1.1",
|
"httpVersion": "HTTP/1.1",
|
||||||
"redirectURL": "",
|
"redirectURL": "",
|
||||||
"status": 200,
|
"status": 200,
|
||||||
"statusText": "OK"
|
"statusText": "OK"
|
||||||
},
|
},
|
||||||
"startedDateTime": "2021-10-11T11:17:52.646Z",
|
"startedDateTime": "2022-03-09T12:14:07.734Z",
|
||||||
"time": 521,
|
"time": 539,
|
||||||
"timings": {
|
"timings": {
|
||||||
"blocked": -1,
|
"blocked": -1,
|
||||||
"connect": -1,
|
"connect": -1,
|
||||||
|
@ -125,7 +123,7 @@
|
||||||
"receive": 0,
|
"receive": 0,
|
||||||
"send": 0,
|
"send": 0,
|
||||||
"ssl": -1,
|
"ssl": -1,
|
||||||
"wait": 521
|
"wait": 539
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -4,9 +4,115 @@
|
||||||
"creator": {
|
"creator": {
|
||||||
"comment": "persister:fs",
|
"comment": "persister:fs",
|
||||||
"name": "Polly.JS",
|
"name": "Polly.JS",
|
||||||
"version": "4.3.0"
|
"version": "5.1.0"
|
||||||
},
|
},
|
||||||
"entries": [
|
"entries": [
|
||||||
|
{
|
||||||
|
"_id": "414a8e773ab89cc536de866e780f5320",
|
||||||
|
"_order": 0,
|
||||||
|
"cache": {},
|
||||||
|
"request": {
|
||||||
|
"bodySize": 636,
|
||||||
|
"cookies": [],
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"_fromType": "array",
|
||||||
|
"name": "accept",
|
||||||
|
"value": "*/*"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_fromType": "array",
|
||||||
|
"name": "content-type",
|
||||||
|
"value": "application/json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_fromType": "array",
|
||||||
|
"name": "content-length",
|
||||||
|
"value": "636"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_fromType": "array",
|
||||||
|
"name": "user-agent",
|
||||||
|
"value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_fromType": "array",
|
||||||
|
"name": "accept-encoding",
|
||||||
|
"value": "gzip,deflate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_fromType": "array",
|
||||||
|
"name": "connection",
|
||||||
|
"value": "close"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "host",
|
||||||
|
"value": "localhost:8000"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"headersSize": 254,
|
||||||
|
"httpVersion": "HTTP/1.1",
|
||||||
|
"method": "POST",
|
||||||
|
"postData": {
|
||||||
|
"mimeType": "application/json",
|
||||||
|
"params": [],
|
||||||
|
"text": "{\"operationName\":\"loginWithoutDetails\",\"variables\":{\"email\":\"admin@example.com\",\"password\":\"NotAValidPassword123!\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment UserBaseFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n __typename\\n}\\n\\nmutation loginWithoutDetails($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserBaseFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}"
|
||||||
|
},
|
||||||
|
"queryString": [],
|
||||||
|
"url": "http://localhost:8000/graphql/"
|
||||||
|
},
|
||||||
|
"response": {
|
||||||
|
"bodySize": 321,
|
||||||
|
"content": {
|
||||||
|
"mimeType": "application/json",
|
||||||
|
"size": 321,
|
||||||
|
"text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": null, \"token\": null, \"errors\": [{\"code\": \"INVALID_CREDENTIALS\", \"field\": \"email\", \"message\": \"Please, enter valid credentials\", \"__typename\": \"AccountError\"}], \"user\": null, \"__typename\": \"CreateToken\"}}, \"extensions\": {\"cost\": {\"requestedQueryCost\": 0, \"maximumAvailable\": 50000}}}"
|
||||||
|
},
|
||||||
|
"cookies": [],
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "date",
|
||||||
|
"value": "Wed, 09 Mar 2022 12:14:08 GMT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "server",
|
||||||
|
"value": "WSGIServer/0.2 CPython/3.9.10"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "content-type",
|
||||||
|
"value": "application/json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "content-length",
|
||||||
|
"value": "321"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x-content-type-options",
|
||||||
|
"value": "nosniff"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "referrer-policy",
|
||||||
|
"value": "same-origin"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"headersSize": 194,
|
||||||
|
"httpVersion": "HTTP/1.1",
|
||||||
|
"redirectURL": "",
|
||||||
|
"status": 200,
|
||||||
|
"statusText": "OK"
|
||||||
|
},
|
||||||
|
"startedDateTime": "2022-03-09T12:14:08.308Z",
|
||||||
|
"time": 365,
|
||||||
|
"timings": {
|
||||||
|
"blocked": -1,
|
||||||
|
"connect": -1,
|
||||||
|
"dns": -1,
|
||||||
|
"receive": 0,
|
||||||
|
"send": 0,
|
||||||
|
"ssl": -1,
|
||||||
|
"wait": 365
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"_id": "f36c6d9d965b62862363338cf17d6135",
|
"_id": "f36c6d9d965b62862363338cf17d6135",
|
||||||
"_order": 0,
|
"_order": 0,
|
||||||
|
@ -62,21 +168,21 @@
|
||||||
"url": "http://localhost:8000/graphql/"
|
"url": "http://localhost:8000/graphql/"
|
||||||
},
|
},
|
||||||
"response": {
|
"response": {
|
||||||
"bodySize": 24,
|
"bodySize": 102,
|
||||||
"content": {
|
"content": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"size": 24,
|
"size": 102,
|
||||||
"text": "[{\"data\": {\"me\": null}}]"
|
"text": "[{\"data\": {\"me\": null}, \"extensions\": {\"cost\": {\"requestedQueryCost\": 1, \"maximumAvailable\": 50000}}}]"
|
||||||
},
|
},
|
||||||
"cookies": [],
|
"cookies": [],
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
"name": "date",
|
"name": "date",
|
||||||
"value": "Thu, 07 Oct 2021 23:09:08 GMT"
|
"value": "Wed, 09 Mar 2022 12:14:08 GMT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "server",
|
"name": "server",
|
||||||
"value": "WSGIServer/0.2 CPython/3.8.3"
|
"value": "WSGIServer/0.2 CPython/3.9.10"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "content-type",
|
"name": "content-type",
|
||||||
|
@ -84,7 +190,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "content-length",
|
"name": "content-length",
|
||||||
"value": "24"
|
"value": "102"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x-content-type-options",
|
"name": "x-content-type-options",
|
||||||
|
@ -95,14 +201,14 @@
|
||||||
"value": "same-origin"
|
"value": "same-origin"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"headersSize": 192,
|
"headersSize": 194,
|
||||||
"httpVersion": "HTTP/1.1",
|
"httpVersion": "HTTP/1.1",
|
||||||
"redirectURL": "",
|
"redirectURL": "",
|
||||||
"status": 200,
|
"status": 200,
|
||||||
"statusText": "OK"
|
"statusText": "OK"
|
||||||
},
|
},
|
||||||
"startedDateTime": "2021-10-07T23:09:08.310Z",
|
"startedDateTime": "2022-03-09T12:14:08.311Z",
|
||||||
"time": 105,
|
"time": 70,
|
||||||
"timings": {
|
"timings": {
|
||||||
"blocked": -1,
|
"blocked": -1,
|
||||||
"connect": -1,
|
"connect": -1,
|
||||||
|
@ -110,113 +216,7 @@
|
||||||
"receive": 0,
|
"receive": 0,
|
||||||
"send": 0,
|
"send": 0,
|
||||||
"ssl": -1,
|
"ssl": -1,
|
||||||
"wait": 105
|
"wait": 70
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_id": "156d01ee9c99f8b74ab79e7482eadf9f",
|
|
||||||
"_order": 0,
|
|
||||||
"cache": {},
|
|
||||||
"request": {
|
|
||||||
"bodySize": 1170,
|
|
||||||
"cookies": [],
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"_fromType": "array",
|
|
||||||
"name": "accept",
|
|
||||||
"value": "*/*"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_fromType": "array",
|
|
||||||
"name": "content-type",
|
|
||||||
"value": "application/json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_fromType": "array",
|
|
||||||
"name": "content-length",
|
|
||||||
"value": "1170"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_fromType": "array",
|
|
||||||
"name": "user-agent",
|
|
||||||
"value": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_fromType": "array",
|
|
||||||
"name": "accept-encoding",
|
|
||||||
"value": "gzip,deflate"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"_fromType": "array",
|
|
||||||
"name": "connection",
|
|
||||||
"value": "close"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "host",
|
|
||||||
"value": "localhost:8000"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"headersSize": 255,
|
|
||||||
"httpVersion": "HTTP/1.1",
|
|
||||||
"method": "POST",
|
|
||||||
"postData": {
|
|
||||||
"mimeType": "application/json",
|
|
||||||
"params": [],
|
|
||||||
"text": "{\"operationName\":\"login\",\"variables\":{\"email\":\"admin@example.com\",\"password\":\"NotAValidPassword123!\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment AddressFragment on Address {\\n id\\n firstName\\n lastName\\n companyName\\n streetAddress1\\n streetAddress2\\n city\\n cityArea\\n postalCode\\n country {\\n code\\n country\\n __typename\\n }\\n countryArea\\n phone\\n isDefaultBillingAddress\\n isDefaultShippingAddress\\n __typename\\n}\\n\\nfragment UserFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n metadata {\\n key\\n value\\n __typename\\n }\\n defaultShippingAddress {\\n ...AddressFragment\\n __typename\\n }\\n defaultBillingAddress {\\n ...AddressFragment\\n __typename\\n }\\n addresses {\\n ...AddressFragment\\n __typename\\n }\\n __typename\\n}\\n\\nmutation login($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}"
|
|
||||||
},
|
|
||||||
"queryString": [],
|
|
||||||
"url": "http://localhost:8000/graphql/"
|
|
||||||
},
|
|
||||||
"response": {
|
|
||||||
"bodySize": 243,
|
|
||||||
"content": {
|
|
||||||
"mimeType": "application/json",
|
|
||||||
"size": 243,
|
|
||||||
"text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": null, \"token\": null, \"errors\": [{\"code\": \"INVALID_CREDENTIALS\", \"field\": \"email\", \"message\": \"Please, enter valid credentials\", \"__typename\": \"AccountError\"}], \"user\": null, \"__typename\": \"CreateToken\"}}}"
|
|
||||||
},
|
|
||||||
"cookies": [],
|
|
||||||
"headers": [
|
|
||||||
{
|
|
||||||
"name": "date",
|
|
||||||
"value": "Mon, 11 Oct 2021 11:17:53 GMT"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "server",
|
|
||||||
"value": "WSGIServer/0.2 CPython/3.8.3"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "content-type",
|
|
||||||
"value": "application/json"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "content-length",
|
|
||||||
"value": "243"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "x-content-type-options",
|
|
||||||
"value": "nosniff"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "referrer-policy",
|
|
||||||
"value": "same-origin"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"headersSize": 193,
|
|
||||||
"httpVersion": "HTTP/1.1",
|
|
||||||
"redirectURL": "",
|
|
||||||
"status": 200,
|
|
||||||
"statusText": "OK"
|
|
||||||
},
|
|
||||||
"startedDateTime": "2021-10-11T11:17:53.202Z",
|
|
||||||
"time": 438,
|
|
||||||
"timings": {
|
|
||||||
"blocked": -1,
|
|
||||||
"connect": -1,
|
|
||||||
"dns": -1,
|
|
||||||
"receive": 0,
|
|
||||||
"send": 0,
|
|
||||||
"ssl": -1,
|
|
||||||
"wait": 438
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
"creator": {
|
"creator": {
|
||||||
"comment": "persister:fs",
|
"comment": "persister:fs",
|
||||||
"name": "Polly.JS",
|
"name": "Polly.JS",
|
||||||
"version": "5.0.0"
|
"version": "5.1.0"
|
||||||
},
|
},
|
||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"_id": "07fe7bf33b7e219c3280229514fcf39d",
|
"_id": "81637bd419aedd21a86324a846d9d163",
|
||||||
"_order": 0,
|
"_order": 0,
|
||||||
"cache": {},
|
"cache": {},
|
||||||
"request": {
|
"request": {
|
||||||
"bodySize": 1158,
|
"bodySize": 624,
|
||||||
"cookies": [],
|
"cookies": [],
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
{
|
{
|
||||||
"_fromType": "array",
|
"_fromType": "array",
|
||||||
"name": "content-length",
|
"name": "content-length",
|
||||||
"value": "1158"
|
"value": "624"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_fromType": "array",
|
"_fromType": "array",
|
||||||
|
@ -50,33 +50,33 @@
|
||||||
"value": "localhost:8000"
|
"value": "localhost:8000"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"headersSize": 255,
|
"headersSize": 254,
|
||||||
"httpVersion": "HTTP/1.1",
|
"httpVersion": "HTTP/1.1",
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"postData": {
|
"postData": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"params": [],
|
"params": [],
|
||||||
"text": "{\"operationName\":\"login\",\"variables\":{\"email\":\"client@example.com\",\"password\":\"password\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment AddressFragment on Address {\\n id\\n firstName\\n lastName\\n companyName\\n streetAddress1\\n streetAddress2\\n city\\n cityArea\\n postalCode\\n country {\\n code\\n country\\n __typename\\n }\\n countryArea\\n phone\\n isDefaultBillingAddress\\n isDefaultShippingAddress\\n __typename\\n}\\n\\nfragment UserFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n metadata {\\n key\\n value\\n __typename\\n }\\n defaultShippingAddress {\\n ...AddressFragment\\n __typename\\n }\\n defaultBillingAddress {\\n ...AddressFragment\\n __typename\\n }\\n addresses {\\n ...AddressFragment\\n __typename\\n }\\n __typename\\n}\\n\\nmutation login($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}"
|
"text": "{\"operationName\":\"loginWithoutDetails\",\"variables\":{\"email\":\"client@example.com\",\"password\":\"password\"},\"query\":\"fragment AccountErrorFragment on AccountError {\\n code\\n field\\n message\\n __typename\\n}\\n\\nfragment UserBaseFragment on User {\\n id\\n email\\n firstName\\n lastName\\n isStaff\\n __typename\\n}\\n\\nmutation loginWithoutDetails($email: String!, $password: String!) {\\n tokenCreate(email: $email, password: $password) {\\n csrfToken\\n token\\n errors {\\n ...AccountErrorFragment\\n __typename\\n }\\n user {\\n ...UserBaseFragment\\n __typename\\n }\\n __typename\\n }\\n}\\n\"}"
|
||||||
},
|
},
|
||||||
"queryString": [],
|
"queryString": [],
|
||||||
"url": "http://localhost:8000/graphql/"
|
"url": "http://localhost:8000/graphql/"
|
||||||
},
|
},
|
||||||
"response": {
|
"response": {
|
||||||
"bodySize": 243,
|
"bodySize": 321,
|
||||||
"content": {
|
"content": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"size": 243,
|
"size": 321,
|
||||||
"text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": null, \"token\": null, \"errors\": [{\"code\": \"INVALID_CREDENTIALS\", \"field\": \"email\", \"message\": \"Please, enter valid credentials\", \"__typename\": \"AccountError\"}], \"user\": null, \"__typename\": \"CreateToken\"}}}"
|
"text": "{\"data\": {\"tokenCreate\": {\"csrfToken\": null, \"token\": null, \"errors\": [{\"code\": \"INVALID_CREDENTIALS\", \"field\": \"email\", \"message\": \"Please, enter valid credentials\", \"__typename\": \"AccountError\"}], \"user\": null, \"__typename\": \"CreateToken\"}}, \"extensions\": {\"cost\": {\"requestedQueryCost\": 0, \"maximumAvailable\": 50000}}}"
|
||||||
},
|
},
|
||||||
"cookies": [],
|
"cookies": [],
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
"name": "date",
|
"name": "date",
|
||||||
"value": "Mon, 11 Oct 2021 11:17:53 GMT"
|
"value": "Wed, 09 Mar 2022 12:14:08 GMT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "server",
|
"name": "server",
|
||||||
"value": "WSGIServer/0.2 CPython/3.8.3"
|
"value": "WSGIServer/0.2 CPython/3.9.10"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "content-type",
|
"name": "content-type",
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "content-length",
|
"name": "content-length",
|
||||||
"value": "243"
|
"value": "321"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "x-content-type-options",
|
"name": "x-content-type-options",
|
||||||
|
@ -95,14 +95,14 @@
|
||||||
"value": "same-origin"
|
"value": "same-origin"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"headersSize": 193,
|
"headersSize": 194,
|
||||||
"httpVersion": "HTTP/1.1",
|
"httpVersion": "HTTP/1.1",
|
||||||
"redirectURL": "",
|
"redirectURL": "",
|
||||||
"status": 200,
|
"status": 200,
|
||||||
"statusText": "OK"
|
"statusText": "OK"
|
||||||
},
|
},
|
||||||
"startedDateTime": "2021-10-11T11:17:53.664Z",
|
"startedDateTime": "2022-03-09T12:14:08.691Z",
|
||||||
"time": 61,
|
"time": 121,
|
||||||
"timings": {
|
"timings": {
|
||||||
"blocked": -1,
|
"blocked": -1,
|
||||||
"connect": -1,
|
"connect": -1,
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
"receive": 0,
|
"receive": 0,
|
||||||
"send": 0,
|
"send": 0,
|
||||||
"ssl": -1,
|
"ssl": -1,
|
||||||
"wait": 61
|
"wait": 121
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -126,7 +126,8 @@ export function useAuthProvider({
|
||||||
try {
|
try {
|
||||||
const result = await login({
|
const result = await login({
|
||||||
email,
|
email,
|
||||||
password
|
password,
|
||||||
|
includeDetails: false
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result && !result.data.tokenCreate.errors.length) {
|
if (result && !result.data.tokenCreate.errors.length) {
|
||||||
|
|
Loading…
Reference in a new issue