Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# change to production before deploying
c# change to production before deploying
NODE_ENV='development'
PORT=5000
APP_ID='00000000-0000-0000-0000-000000000000'
Expand Down
17 changes: 14 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,20 @@ module.exports = {
'block',
[
'',
' Free and Open Source - GNU LGPLv3',
` Copyright © ${new Date().getFullYear()}`,
' Afonso Barracha',
` Copyright (C) ${new Date().getFullYear()} Afonso Barracha`,
'',
' Nest OAuth is free software: you can redistribute it and/or modify',
' it under the terms of the GNU Lesser General Public License as published by',
' the Free Software Foundation, either version 3 of the License, or',
' (at your option) any later version.',
'',
' Nest OAuth is distributed in the hope that it will be useful,',
' but WITHOUT ANY WARRANTY; without even the implied warranty of',
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the',
' GNU Lesser General Public License for more details.',
'',
' You should have received a copy of the GNU Lesser General Public License',
' along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.',
'',
],
2,
Expand Down
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

File renamed without changes.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ $ yarn test:e2e

## License

The code of this tutorial is licensed under the GNU LGPLv3 - see the [LICENSE](LICENSE) file for details.
The code of this tutorial is licensed under the GNU Lesser General Public License v3.0. See the [Copying](COPYING)
and [Copying Lesser](COPYING.LESSER) files for details.
128 changes: 64 additions & 64 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,74 +22,74 @@
"migrate:update": "npx mikro-orm schema:update --run"
},
"dependencies": {
"@fastify/cookie": "^8.3.0",
"@fastify/cors": "^8.2.1",
"@fastify/csrf-protection": "^6.2.0",
"@fastify/helmet": "^10.1.0",
"@fastify/static": "^6.10.1",
"@mikro-orm/core": "^5.6.16",
"@mikro-orm/nestjs": "^5.1.8",
"@mikro-orm/postgresql": "^5.6.16",
"@nestjs/axios": "^2.0.0",
"@nestjs/cache-manager": "^1.0.0",
"@nestjs/common": "^9.4.0",
"@nestjs/config": "^2.3.1",
"@nestjs/core": "^9.4.0",
"@fastify/cookie": "9.4.0",
"@fastify/cors": "9.0.1",
"@fastify/csrf-protection": "6.4.1",
"@fastify/helmet": "11.1.1",
"@fastify/static": "7.0.4",
"@mikro-orm/core": "6.3.4",
"@mikro-orm/nestjs": "6.0.2",
"@mikro-orm/postgresql": "6.3.4",
"@nestjs/axios": "3.0.2",
"@nestjs/cache-manager": "2.2.2",
"@nestjs/common": "10.3.10",
"@nestjs/config": "3.2.3",
"@nestjs/core": "10.3.10",
"@nestjs/mapped-types": "*",
"@nestjs/platform-fastify": "^9.4.0",
"@nestjs/swagger": "^6.3.0",
"@nestjs/throttler": "^4.0.0",
"axios": "^1.3.5",
"bcrypt": "^5.1.0",
"cache-manager": "^5.2.0",
"cache-manager-ioredis-yet": "^1.1.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"dayjs": "^1.11.7",
"fastify": "^4.15.0",
"handlebars": "^4.7.7",
"ioredis": "^5.3.1",
"joi": "^17.9.1",
"jsonwebtoken": "^9.0.0",
"nestjs-throttler-storage-redis": "^0.3.0",
"nodemailer": "^6.9.1",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.0",
"simple-oauth2": "^5.0.0",
"slugify": "^1.6.6",
"uuid": "^9.0.0"
"@nestjs/platform-fastify": "10.3.10",
"@nestjs/swagger": "7.4.0",
"@nestjs/throttler": "6.1.0",
"axios": "1.7.3",
"bcrypt": "5.1.1",
"cache-manager": "5.7.6",
"cache-manager-ioredis-yet": "2.1.1",
"class-transformer": "0.5.1",
"class-validator": "0.14.1",
"dayjs": "1.11.12",
"fastify": "4.28.0",
"handlebars": "4.7.8",
"ioredis": "5.4.1",
"joi": "17.13.3",
"jsonwebtoken": "9.0.2",
"nestjs-throttler-storage-redis": "0.5.0",
"nodemailer": "6.9.14",
"reflect-metadata": "0.2.2",
"rxjs": "7.8.1",
"simple-oauth2": "5.1.0",
"slugify": "1.6.6",
"uuid": "10.0.0"
},
"devDependencies": {
"@faker-js/faker": "^7.6.0",
"@mikro-orm/cli": "^5.6.16",
"@mikro-orm/sqlite": "^5.6.16",
"@nestjs/cli": "^9.4.0",
"@nestjs/schematics": "^9.1.0",
"@nestjs/testing": "^9.4.0",
"@types/bcrypt": "^5.0.0",
"@types/handlebars": "^4.1.0",
"@types/jest": "29.5.0",
"@types/jsonwebtoken": "^9.0.1",
"@types/node": "18.15.11",
"@types/nodemailer": "^6.4.7",
"@types/simple-oauth2": "^5.0.4",
"@types/supertest": "^2.0.12",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-prettier": "^4.2.1",
"jest": "29.5.0",
"prettier": "^2.8.7",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "29.1.0",
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"@faker-js/faker": "8.4.1",
"@mikro-orm/cli": "6.3.4",
"@mikro-orm/sqlite": "6.3.4",
"@nestjs/cli": "10.4.4",
"@nestjs/schematics": "10.1.3",
"@nestjs/testing": "10.3.10",
"@types/bcrypt": "5.0.2",
"@types/handlebars": "4.1.0",
"@types/jest": "29.5.12",
"@types/jsonwebtoken": "9.0.6",
"@types/node": "22.2.0",
"@types/nodemailer": "6.4.15",
"@types/simple-oauth2": "5.0.7",
"@types/supertest": "6.0.2",
"@types/uuid": "10.0.0",
"@typescript-eslint/eslint-plugin": "8.0.1",
"@typescript-eslint/parser": "8.0.1",
"eslint": "8.57.0",
"eslint-config-prettier": "8.9.0",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-prettier": "5.2.1",
"jest": "29.7.0",
"prettier": "3.3.3",
"source-map-support": "0.5.21",
"supertest": "7.0.0",
"ts-jest": "29.2.4",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"tsconfig-paths": "4.2.0",
"typescript": "^4.9.5"
"typescript": "5.5.4"
},
"jest": {
"moduleFileExtensions": [
Expand Down
17 changes: 14 additions & 3 deletions src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha
Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { MikroOrmModule } from '@mikro-orm/nestjs';
Expand Down
17 changes: 14 additions & 3 deletions src/app.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha
Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { MikroORM } from '@mikro-orm/core';
Expand Down
17 changes: 14 additions & 3 deletions src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha
Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import {
Expand Down
17 changes: 14 additions & 3 deletions src/auth/auth.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha

Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { Module } from '@nestjs/common';
Expand Down
17 changes: 14 additions & 3 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha
Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { CACHE_MANAGER } from '@nestjs/cache-manager';
Expand Down
17 changes: 14 additions & 3 deletions src/auth/decorators/current-user.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha

Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { createParamDecorator, ExecutionContext } from '@nestjs/common';
Expand Down
17 changes: 14 additions & 3 deletions src/auth/decorators/origin.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha
Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { createParamDecorator, ExecutionContext } from '@nestjs/common';
Expand Down
17 changes: 14 additions & 3 deletions src/auth/decorators/public.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha

Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { SetMetadata } from '@nestjs/common';
Expand Down
17 changes: 14 additions & 3 deletions src/auth/dtos/change-password.dto.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha

Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { ApiProperty } from '@nestjs/swagger';
Expand Down
17 changes: 14 additions & 3 deletions src/auth/dtos/confirm-email.dto.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
/*
Free and Open Source - GNU LGPLv3
Copyright © 2023
Afonso Barracha
Copyright (C) 2024 Afonso Barracha
Nest OAuth is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Nest OAuth is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
*/

import { ApiProperty } from '@nestjs/swagger';
Expand Down
Loading