Skip to content

Commit 34eb13b

Browse files
authored
Merge pull request #9 from CKY-/priterprint-api
chore: prittyfiy pages
2 parents 7914aef + 2f153c3 commit 34eb13b

File tree

14 files changed

+962
-1042
lines changed

14 files changed

+962
-1042
lines changed

Diff for: src/app/v5/api/auth/page.mdx

+2-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Redirects the user to the authorization URI of the specified authentication prov
1414

1515
```
1616
GET /auth?providerId=google
17-
1817
```
1918

2019
#### Example Response (Redirect):
@@ -24,7 +23,6 @@ This will redirect the user to the authorization URI of the specified provider (
2423
```http
2524
HTTP/1.1 302 Found
2625
Location: https://accounts.google.com/o/oauth2/auth?client_id=...&redirect_uri=...&response_type=code&scope=...
27-
2826
```
2927

3028
## `GET /auth/callback2`
@@ -42,7 +40,6 @@ for an access token.
4240

4341
```
4442
GET /auth/callback2?state=google&code=authorizationCodeHere
45-
4643
```
4744

4845
#### Example Response (Redirect):
@@ -52,7 +49,6 @@ Upon success, redirects to the login success page.
5249
```http
5350
HTTP/1.1 302 Found
5451
Location: /loginsuccess?provider=google
55-
5652
```
5753

5854
#### Example Response (Error):
@@ -61,16 +57,14 @@ If the `state` parameter is invalid or missing, returns an error response.
6157

6258
```json
6359
{
64-
"error": "Invalid provider id in state"
60+
"error": "Invalid provider id in state"
6561
}
66-
6762
```
6863

6964
If the authentication fails (e.g., invalid token exchange or an OAuth error), the response will be:
7065

7166
```json
7267
{
73-
"error": "Authentication failed"
68+
"error": "Authentication failed"
7469
}
75-
7670
```

0 commit comments

Comments
 (0)