Skip to content

Commit 47f2b69

Browse files
authored
feat(chore): update deps and implement gitlab provider (#220)
1 parent c5e37e1 commit 47f2b69

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ You can choose some default setup to assign to `auth` option.
6868
- `APPLE_CONFIGURATION`
6969
- `FACEBOOK_CONFIGURATION`
7070
- `GITHUB_CONFIGURATION`
71+
- `GITLAB_CONFIGURATION`
7172
- `LINKEDIN_CONFIGURATION`
7273
- `GOOGLE_CONFIGURATION`
7374
- `MICROSOFT_CONFIGURATION`

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ fastifyOauth2.GITHUB_CONFIGURATION = {
201201
authorizePath: '/login/oauth/authorize'
202202
}
203203

204+
fastifyOauth2.GITLAB_CONFIGURATION = {
205+
authorizeHost: 'https://gitlab.com',
206+
authorizePath: '/oauth/authorize',
207+
tokenHost: 'https://gitlab.com',
208+
tokenPath: '/oauth/token'
209+
}
210+
204211
fastifyOauth2.LINKEDIN_CONFIGURATION = {
205212
authorizeHost: 'https://www.linkedin.com',
206213
authorizePath: '/oauth/v2/authorization',

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@
2828
"homepage": "https://github.com/fastify/fastify-oauth2#readme",
2929
"devDependencies": {
3030
"@fastify/pre-commit": "^2.0.2",
31-
"@types/node": "^20.1.1",
32-
"fastify": "^4.3.0",
33-
"nock": "^13.2.1",
34-
"simple-get": "^4.0.0",
31+
"@types/node": "^20.5.3",
32+
"fastify": "^4.21.0",
33+
"nock": "^13.3.3",
34+
"simple-get": "^4.0.1",
3535
"snazzy": "^9.0.0",
36-
"standard": "^17.0.0",
37-
"tap": "^16.0.0",
38-
"tsd": "^0.28.0"
36+
"standard": "^17.1.0",
37+
"tap": "^16.3.8",
38+
"tsd": "^0.28.1"
3939
},
4040
"dependencies": {
4141
"@fastify/cookie": "^9.0.4",
42-
"fastify-plugin": "^4.0.0",
42+
"fastify-plugin": "^4.5.1",
4343
"simple-oauth2": "^5.0.0"
4444
},
4545
"publishConfig": {

test/index.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,11 +778,12 @@ t.test('preset configuration generate-callback-uri-params', t => {
778778
})
779779

780780
t.test('preset configuration generate-callback-uri-params', t => {
781-
t.plan(48)
781+
t.plan(52)
782782

783783
const presetConfigs = [
784784
'FACEBOOK_CONFIGURATION',
785785
'GITHUB_CONFIGURATION',
786+
'GITLAB_CONFIGURATION',
786787
'LINKEDIN_CONFIGURATION',
787788
'GOOGLE_CONFIGURATION',
788789
'MICROSOFT_CONFIGURATION',

types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ interface FastifyOauth2 extends FastifyPluginCallback<fastifyOauth2.FastifyOAuth
55
DISCORD_CONFIGURATION: fastifyOauth2.ProviderConfiguration;
66
FACEBOOK_CONFIGURATION: fastifyOauth2.ProviderConfiguration;
77
GITHUB_CONFIGURATION: fastifyOauth2.ProviderConfiguration;
8+
GITLAB_CONFIGURATION: fastifyOauth2.ProviderConfiguration;
89
LINKEDIN_CONFIGURATION: fastifyOauth2.ProviderConfiguration;
910
GOOGLE_CONFIGURATION: fastifyOauth2.ProviderConfiguration;
1011
MICROSOFT_CONFIGURATION: fastifyOauth2.ProviderConfiguration;

0 commit comments

Comments
 (0)