Authentication
Here you will find everything about authentication
Authenticate a new user
Request Body
Name
Type
Description
curl --location --request POST 'http://localhost:3001/auth/signUp' \
--data-raw '{
"email": "[email protected]",
"password": "123456",
"username": "example",
"profile": {
"name": "Example",
"socialMediaURLs": {}S
}
}'var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"email": "[email protected]",
"password": "123456",
"username": "example",
"profile": {
"name": "Example",
"socialMediaURLs": {}
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("http://localhost:3001/auth/signUp", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));{
"id": "63cd0f17b570328000845e2d",
"createdAt": "2023-01-22T10:25:27.336Z",
"updatedAt": "2023-01-22T10:25:27.336Z",
"username": "example",
"email": "[email protected]",
"roles": [
"USER"
],
"profile": {
"name": "Example",
"emailVerified": null,
"photo": null,
"socialMediaURLs": {
"gitHub": null,
"linkedIn": null,
"instagram": null,
"twitter": null,
"facebook": null
}
},
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoiNjNjZDBmMTdiNTcwMzI4MDAwODQ1ZTJkIiwiY3JlYXRlZEF0IjoiMjAyMy0wMS0yMlQxMDoyNToyNy4zMzZaIiwidXBkYXRlZEF0IjoiMjAyMy0wMS0yMlQxMDoyNToyNy4zMzZaIiwidXNlcm5hbWUiOiJleGFtcGxlIiwiZW1haWwiOiJleGFtcGxlQGdlbmZpZC5kZXYiLCJyb2xlcyI6WyJVU0VSIl0sInByb2ZpbGUiOnsibmFtZSI6IkV4YW1wbGUiLCJlbWFpbFZlcmlmaWVkIjpudWxsLCJwaG90byI6bnVsbCwic29jaWFsTWVkaWFVUkxzIjp7ImdpdEh1YiI6bnVsbCwibGlua2VkSW4iOm51bGwsImluc3RhZ3JhbSI6bnVsbCwidHdpdHRlciI6bnVsbCwiZmFjZWJvb2siOm51bGx9fX0sImlhdCI6MTY3NDM4MzEyNywiZXhwIjoxNjc0OTg3OTI3fQ.-SFuCh_CuWGVQBESXd1UrtP6AE1PSFn-owLiLAsspUk"
}Authenticate a registred user
Request Body
Name
Type
Description
Get signed user
Headers
Name
Type
Description
Cookies
Name
Type
Description
Last updated