Auth
Authentication
Auth
User registration
const data = JSON.stringify({
firstName: 'Evgeny',
lastName: 'Smirnov',
login: 'nodewalker',
email: '[email protected]',
password: '**********',
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', 'https://fakestoreapi.ru/auth/signup');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Accept', 'application/json');
xhr.send(data);Parameters
Name
In
Type
Required
Description
Responses
Status
Meaning
Description
Schema
User login
Parameters
Name
In
Type
Required
Description
Responses
Status
Meaning
Description
Schema
Refresh auth tokens
Parameters
Name
In
Type
Required
Description
Responses
Status
Meaning
Description
Schema
Last updated