Skip to content

Commit 13d3886

Browse files
committed
feat: add documentation for social auth routes
1 parent 07e0960 commit 13d3886

4 files changed

Lines changed: 90 additions & 6 deletions

File tree

src/jsdocs/providers/facebook.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
paths:
2+
# Endpoint to authenticate a Facebook user
3+
/social/facebook:
4+
# GET operation
5+
get:
6+
tags:
7+
- providers
8+
9+
summary: Authenticates with Facebook
10+
11+
responses:
12+
"200":
13+
description: Successful operation
14+
schema:
15+
type: object
16+
properties:
17+
status:
18+
type: string
19+
example: success
20+
data:
21+
type: object
22+
properties:
23+
authenticationUrl:
24+
type: string
25+
example: https://www.facebook.com/v4.0/dialog/oauth
26+
"400":
27+
description: Invalid body supplied
28+
schema:
29+
$ref: "#/definitions/BadRequest"

src/jsdocs/providers/github.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
paths:
2+
# Endpoint to authenticate a GitHub user
3+
/social/github:
4+
# GET operation
5+
get:
6+
tags:
7+
- providers
8+
9+
summary: Authenticates with GitHub
10+
11+
responses:
12+
"200":
13+
description: Successful operation
14+
schema:
15+
type: object
16+
properties:
17+
status:
18+
type: string
19+
example: success
20+
data:
21+
type: object
22+
properties:
23+
authenticationUrl:
24+
type: string
25+
example: https://github.com/login/oauth/authorize
26+
"400":
27+
description: Invalid body supplied
28+
schema:
29+
$ref: "#/definitions/BadRequest"

src/jsdocs/providers/google.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
paths:
2-
# Endpoint to authenticate a user
3-
/google:
2+
# Endpoint to authenticate a Google user
3+
/social/google:
44
# GET operation
55
get:
66
tags:
77
- providers
88

99
summary: Authenticates with Google
1010

11-
security:
12-
- AdminToken: []
13-
1411
responses:
1512
"200":
1613
description: Successful operation
@@ -23,7 +20,7 @@ paths:
2320
data:
2421
type: object
2522
properties:
26-
redirectUrl:
23+
authenticationUrl:
2724
type: string
2825
example: https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount
2926
"400":

src/jsdocs/providers/twitter.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
paths:
2+
# Endpoint to authenticate a Twitter user
3+
/social/twitter:
4+
# GET operation
5+
get:
6+
tags:
7+
- providers
8+
9+
summary: Authenticates with Twitter
10+
11+
responses:
12+
"200":
13+
description: Successful operation
14+
schema:
15+
type: object
16+
properties:
17+
status:
18+
type: string
19+
example: success
20+
data:
21+
type: object
22+
properties:
23+
authenticationUrl:
24+
type: string
25+
example: https://api.twitter.com/oauth/authenticate
26+
"400":
27+
description: Invalid body supplied
28+
schema:
29+
$ref: "#/definitions/BadRequest"

0 commit comments

Comments
 (0)