Skip to content

Commit beb789c

Browse files
authored
Merge pull request #55 from tugascript/external-providers
fix(oauth2): cache state
2 parents d78e6be + d97a044 commit beb789c

File tree

101 files changed

+4980
-2461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+4980
-2461
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# change to production before deploying
1+
c# change to production before deploying
22
NODE_ENV='development'
33
PORT=5000
44
APP_ID='00000000-0000-0000-0000-000000000000'

.eslintrc.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,20 @@ module.exports = {
2727
'block',
2828
[
2929
'',
30-
' Free and Open Source - GNU LGPLv3',
31-
` Copyright © ${new Date().getFullYear()}`,
32-
' Afonso Barracha',
30+
` Copyright (C) ${new Date().getFullYear()} Afonso Barracha`,
31+
'',
32+
' Nest OAuth is free software: you can redistribute it and/or modify',
33+
' it under the terms of the GNU Lesser General Public License as published by',
34+
' the Free Software Foundation, either version 3 of the License, or',
35+
' (at your option) any later version.',
36+
'',
37+
' Nest OAuth is distributed in the hope that it will be useful,',
38+
' but WITHOUT ANY WARRANTY; without even the implied warranty of',
39+
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the',
40+
' GNU Lesser General Public License for more details.',
41+
'',
42+
' You should have received a copy of the GNU Lesser General Public License',
43+
' along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.',
3344
'',
3445
],
3546
2,

COPYING

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.
File renamed without changes.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ $ yarn test:e2e
5151

5252
## License
5353

54-
The code of this tutorial is licensed under the GNU LGPLv3 - see the [LICENSE](LICENSE) file for details.
54+
The code of this tutorial is licensed under the GNU Lesser General Public License v3.0. See the [Copying](COPYING)
55+
and [Copying Lesser](COPYING.LESSER) files for details.

package.json

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -22,74 +22,74 @@
2222
"migrate:update": "npx mikro-orm schema:update --run"
2323
},
2424
"dependencies": {
25-
"@fastify/cookie": "^8.3.0",
26-
"@fastify/cors": "^8.2.1",
27-
"@fastify/csrf-protection": "^6.2.0",
28-
"@fastify/helmet": "^10.1.0",
29-
"@fastify/static": "^6.10.1",
30-
"@mikro-orm/core": "^5.6.16",
31-
"@mikro-orm/nestjs": "^5.1.8",
32-
"@mikro-orm/postgresql": "^5.6.16",
33-
"@nestjs/axios": "^2.0.0",
34-
"@nestjs/cache-manager": "^1.0.0",
35-
"@nestjs/common": "^9.4.0",
36-
"@nestjs/config": "^2.3.1",
37-
"@nestjs/core": "^9.4.0",
25+
"@fastify/cookie": "9.4.0",
26+
"@fastify/cors": "9.0.1",
27+
"@fastify/csrf-protection": "6.4.1",
28+
"@fastify/helmet": "11.1.1",
29+
"@fastify/static": "7.0.4",
30+
"@mikro-orm/core": "6.3.4",
31+
"@mikro-orm/nestjs": "6.0.2",
32+
"@mikro-orm/postgresql": "6.3.4",
33+
"@nestjs/axios": "3.0.2",
34+
"@nestjs/cache-manager": "2.2.2",
35+
"@nestjs/common": "10.3.10",
36+
"@nestjs/config": "3.2.3",
37+
"@nestjs/core": "10.3.10",
3838
"@nestjs/mapped-types": "*",
39-
"@nestjs/platform-fastify": "^9.4.0",
40-
"@nestjs/swagger": "^6.3.0",
41-
"@nestjs/throttler": "^4.0.0",
42-
"axios": "^1.3.5",
43-
"bcrypt": "^5.1.0",
44-
"cache-manager": "^5.2.0",
45-
"cache-manager-ioredis-yet": "^1.1.0",
46-
"class-transformer": "^0.5.1",
47-
"class-validator": "^0.14.0",
48-
"dayjs": "^1.11.7",
49-
"fastify": "^4.15.0",
50-
"handlebars": "^4.7.7",
51-
"ioredis": "^5.3.1",
52-
"joi": "^17.9.1",
53-
"jsonwebtoken": "^9.0.0",
54-
"nestjs-throttler-storage-redis": "^0.3.0",
55-
"nodemailer": "^6.9.1",
56-
"reflect-metadata": "^0.1.13",
57-
"rxjs": "^7.8.0",
58-
"simple-oauth2": "^5.0.0",
59-
"slugify": "^1.6.6",
60-
"uuid": "^9.0.0"
39+
"@nestjs/platform-fastify": "10.3.10",
40+
"@nestjs/swagger": "7.4.0",
41+
"@nestjs/throttler": "6.1.0",
42+
"axios": "1.7.3",
43+
"bcrypt": "5.1.1",
44+
"cache-manager": "5.7.6",
45+
"cache-manager-ioredis-yet": "2.1.1",
46+
"class-transformer": "0.5.1",
47+
"class-validator": "0.14.1",
48+
"dayjs": "1.11.12",
49+
"fastify": "4.28.0",
50+
"handlebars": "4.7.8",
51+
"ioredis": "5.4.1",
52+
"joi": "17.13.3",
53+
"jsonwebtoken": "9.0.2",
54+
"nestjs-throttler-storage-redis": "0.5.0",
55+
"nodemailer": "6.9.14",
56+
"reflect-metadata": "0.2.2",
57+
"rxjs": "7.8.1",
58+
"simple-oauth2": "5.1.0",
59+
"slugify": "1.6.6",
60+
"uuid": "10.0.0"
6161
},
6262
"devDependencies": {
63-
"@faker-js/faker": "^7.6.0",
64-
"@mikro-orm/cli": "^5.6.16",
65-
"@mikro-orm/sqlite": "^5.6.16",
66-
"@nestjs/cli": "^9.4.0",
67-
"@nestjs/schematics": "^9.1.0",
68-
"@nestjs/testing": "^9.4.0",
69-
"@types/bcrypt": "^5.0.0",
70-
"@types/handlebars": "^4.1.0",
71-
"@types/jest": "29.5.0",
72-
"@types/jsonwebtoken": "^9.0.1",
73-
"@types/node": "18.15.11",
74-
"@types/nodemailer": "^6.4.7",
75-
"@types/simple-oauth2": "^5.0.4",
76-
"@types/supertest": "^2.0.12",
77-
"@types/uuid": "^9.0.1",
78-
"@typescript-eslint/eslint-plugin": "^5.58.0",
79-
"@typescript-eslint/parser": "^5.58.0",
80-
"eslint": "^8.38.0",
81-
"eslint-config-prettier": "^8.8.0",
82-
"eslint-plugin-header": "^3.1.1",
83-
"eslint-plugin-prettier": "^4.2.1",
84-
"jest": "29.5.0",
85-
"prettier": "^2.8.7",
86-
"source-map-support": "^0.5.21",
87-
"supertest": "^6.3.3",
88-
"ts-jest": "29.1.0",
89-
"ts-loader": "^9.4.2",
90-
"ts-node": "^10.9.1",
63+
"@faker-js/faker": "8.4.1",
64+
"@mikro-orm/cli": "6.3.4",
65+
"@mikro-orm/sqlite": "6.3.4",
66+
"@nestjs/cli": "10.4.4",
67+
"@nestjs/schematics": "10.1.3",
68+
"@nestjs/testing": "10.3.10",
69+
"@types/bcrypt": "5.0.2",
70+
"@types/handlebars": "4.1.0",
71+
"@types/jest": "29.5.12",
72+
"@types/jsonwebtoken": "9.0.6",
73+
"@types/node": "22.2.0",
74+
"@types/nodemailer": "6.4.15",
75+
"@types/simple-oauth2": "5.0.7",
76+
"@types/supertest": "6.0.2",
77+
"@types/uuid": "10.0.0",
78+
"@typescript-eslint/eslint-plugin": "8.0.1",
79+
"@typescript-eslint/parser": "8.0.1",
80+
"eslint": "8.57.0",
81+
"eslint-config-prettier": "8.9.0",
82+
"eslint-plugin-header": "3.1.1",
83+
"eslint-plugin-prettier": "5.2.1",
84+
"jest": "29.7.0",
85+
"prettier": "3.3.3",
86+
"source-map-support": "0.5.21",
87+
"supertest": "7.0.0",
88+
"ts-jest": "29.2.4",
89+
"ts-loader": "9.5.1",
90+
"ts-node": "10.9.2",
9191
"tsconfig-paths": "4.2.0",
92-
"typescript": "^4.9.5"
92+
"typescript": "5.5.4"
9393
},
9494
"jest": {
9595
"moduleFileExtensions": [

src/app.module.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
/*
2-
Free and Open Source - GNU LGPLv3
3-
Copyright © 2023
4-
Afonso Barracha
2+
Copyright (C) 2024 Afonso Barracha
3+
4+
Nest OAuth is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU Lesser General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
Nest OAuth is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public License
15+
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
516
*/
617

718
import { MikroOrmModule } from '@mikro-orm/nestjs';

src/app.service.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
/*
2-
Free and Open Source - GNU LGPLv3
3-
Copyright © 2023
4-
Afonso Barracha
2+
Copyright (C) 2024 Afonso Barracha
3+
4+
Nest OAuth is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU Lesser General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
Nest OAuth is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public License
15+
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
516
*/
617

718
import { MikroORM } from '@mikro-orm/core';

src/auth/auth.controller.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
/*
2-
Free and Open Source - GNU LGPLv3
3-
Copyright © 2023
4-
Afonso Barracha
2+
Copyright (C) 2024 Afonso Barracha
3+
4+
Nest OAuth is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU Lesser General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
Nest OAuth is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public License
15+
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
516
*/
617

718
import {

src/auth/auth.module.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
/*
2-
Free and Open Source - GNU LGPLv3
3-
Copyright © 2023
4-
Afonso Barracha
2+
Copyright (C) 2024 Afonso Barracha
3+
4+
Nest OAuth is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU Lesser General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
Nest OAuth is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public License
15+
along with Nest OAuth. If not, see <https://www.gnu.org/licenses/>.
516
*/
617

718
import { Module } from '@nestjs/common';

0 commit comments

Comments
 (0)