{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"75c9c5a5-e501-43af-be2c-f48da41877d0","name":"User Manager Service","description":"# QUICK START\n\nWelcome to user manager service, this system was build to handle with the core of users actions, this includes: login, signup, update contents and TFA. If you wish to get some shorthand on your development, use this system setting the configuration on .env and .env.test, see the .env.example to know the data required on this.\n\nIf you have any question, you could email me on [nicolascbv700@gmail.com](https://null)!\n\nLearn more about the resources used on this API on [https://github.com/NicolasCBV/user-manager-service](https://github.com/NicolasCBV/user-manager-service).\n\n## Obligatory dependencies:\n\n- Firebase storage API\n    \n\nActually, this API uses 14 routes to handle with user data, being organized in routes where the users need to stay or not authenticated. The server have 3 different types of JWT tokens with different types of data, check the type's description below:\n\n## REFRESH TOKEN\n\nThis token is used to re-authenticate user on the server without to pass your password or use the TFA. By default it should have 1 day of TTL (Time To Live), being storage inside the Redis db with this data's:\n\n`{ type: 'refresh_token'; sub: string; email: string; deviceId?: string; iat: number; exp: number; }`\n\n### Routes dependencies:\n\nThe routes that use this token is only the \"/users/refresh-token\", but any routes responsible for authentication process, like \"/users/login\" or \"/users/validate\" can generate this token as a signed cookie.\n\n## FORGOT TOKEN\n\nThis token is used in the case of user forgot your own password, being sent on your email to check your identity. Furthermore, this content, by default have 2 minutes of TTL inside the Redis db, using this data:\n\n`{ type: 'forgot_token'; sub: string; email: string; deviceId?: string; iat: number; exp: number; }`\n\n### Routes dependencies:\n\nOnly the \"/users/finish-forgot-password\" uses this token, but to generate it, the user should pass on \"/users/forgot-password\".\n\n## ACCESS TOKEN\n\nThis is the main token used on this API, every route that makes the CRUD after the sigin/signup process uses this content on token. By default, this data remains on Redis db with 15 minutes of TTL.\n\n`{ type: 'access_token'; sub: string; email: string; deviceId?: string; iat: number; exp: number; userData: { name: string; description?: string | null; imageUrl?: string | null; level: number; createdAt: string; updatedAt: string; } }`\n\n### Routes dependencies:\n\nEvery route that makes the CRUD after user creation, see the list below:\n\n- /users/delete\n- /users/upload-image?deviceId=optional\n- /users/update\n    \n\n## ABOUT DEVICE ID\n\nThe device ID is present inside every token on the server, but it's not obligatory. Consequently, having the types: \"String\" or \"Undefined\". If on your development case, you decide to send the device ID from your front-end, you need to know that basically is impossible to change this content for security reasons and every time that the user try to manipulate your own data, the server will require your device ID. Otherwise, you found a bug, if this is the case, please report your issue.\n\n## ROUTES\n\nActually, this REST API have 14 routes, being divided like auth routes and not auth routes:\n\n### Auth routes:\n\nHandle with data updates.\n\n- /users/delete\n- /users/upload-image?deviceId=optional\n- /users/update\n    \n\n### Not auth routes:\n\nHandle with sigin/signup process.\n\n- /users/get\n- /users/create\n- /users/validate\n- /users/launch-otp\n- /users/forgot-password\n- /users/throwTFA\n- /users/login\n- /users/launch-otp-login\n- /users/cancel\n    \n\nCheckout below every route cited above:\n\n### Note:\n\nEvery route has an anti brute-force resource, that blocks every IP when the user pass the 20º request in 30 seconds. But, some routes like \"/users/throwTFA\" could block you after you try to make login at 4 time.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"25622444","team":5524622,"collectionId":"75c9c5a5-e501-43af-be2c-f48da41877d0","publishedId":"2s93XsXm9b","public":true,"publicUrl":"https://documenter-api.postman.tech/view/25622444/2s93XsXm9b","privateUrl":"https://go.postman.co/documentation/25622444-75c9c5a5-e501-43af-be2c-f48da41877d0","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"5FC15B"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"This is one user manager service system used to handle with authentications and some others additional features."},{"name":"title","value":"User manager system"}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":"https://content.pstmn.io/82a4038b-3802-406f-9040-9b8406620b05/R2FtZSBPbiAoMykucG5n","colors":{"top-bar":"222222","right-sidebar":"303030","highlight":"87E483"}},{"name":"light","logo":"https://content.pstmn.io/f2d8ef3c-650a-4ae1-99b9-6db117370bbf/R2FtZSBPbiAoMykucG5n","colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"5FC15B"}}]}},"version":"8.11.4","publishDate":"2023-08-10T04:23:05.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"User manager system","description":"This is one user manager service system used to handle with authentications and some others additional features."},"logos":{"logoLight":"https://content.pstmn.io/f2d8ef3c-650a-4ae1-99b9-6db117370bbf/R2FtZSBPbiAoMykucG5n","logoDark":"https://content.pstmn.io/82a4038b-3802-406f-9040-9b8406620b05/R2FtZSBPbiAoMykucG5n"}},"statusCode":200},"environments":[{"name":"Base_url","id":"298cb342-95b8-4182-8c53-f3be3c47e89d","owner":"25622444","values":[{"key":"base_url","value":"http://localhost:3000\n","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/03fe28f82310bd2a4619433948169db91d0e65ba2ce0df74790d2a55858abf7e","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Base_url","value":"25622444-298cb342-95b8-4182-8c53-f3be3c47e89d"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s93XsXm9b"}