You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -46,14 +52,14 @@ The authorization code workflow is described in
46
52
47
53
## Installation and usage
48
54
49
-
Install dependencies in both provider and client directories:
55
+
1.Install dependencies in both provider and client directories:
50
56
51
57
```shell
52
58
$ cd provider && npm install
53
59
$ cd ../client && npm install
54
60
```
55
61
56
-
Create a `.env` file in the authorization-code/provider directory:
62
+
2.Create a `.env` file in the authorization-code/provider directory:
57
63
58
64
```
59
65
CLIENT_ID=testclient
@@ -64,7 +70,7 @@ USERNAME=demo
64
70
PASSWORD=demo
65
71
```
66
72
67
-
Create a `.env` file in the authorization-code/client directory:
73
+
3.Create a `.env` file in the authorization-code/client directory:
68
74
69
75
```
70
76
AUTH_SERVER=http://localhost:8080
@@ -73,28 +79,30 @@ CLIENT_SECRET=testsecret
73
79
REDIRECT_URI=http://localhost:3000/callback
74
80
```
75
81
76
-
Start the provider (authorization server + resource server):
82
+
4.Start the provider (authorization server + resource server):
77
83
78
84
```shell
79
85
$ cd provider && npm start
80
86
```
81
87
82
-
Start the client application:
88
+
5.Start the client application:
83
89
84
90
```shell
85
91
$ cd client && npm start
86
92
```
87
93
88
-
Visit http://localhost:3000 to start the authorization code flow.
94
+
6.Visit http://localhost:3000 to start the authorization code flow.
89
95
90
96
## About This Example
91
97
92
-
This example demonstrates a clear separation between the OAuth2 provider (authorization server + resource server) and the client application. Unlike other examples that might combine both roles in a single application, this example shows:
98
+
This example demonstrates a clear separation between the OAuth2 provider (authorization server + resource server)
99
+
and the client application.
100
+
Unlike other examples that might combine both roles in a single application, this example shows:
93
101
94
102
-**Provider** (port 8080): Acts as both authorization server and resource server
95
103
-**Client** (port 3000): A separate web application that consumes OAuth2 services
96
104
97
-
This separation makes it easier to understand what the framework supports and what it doesn't.
105
+
This separation makes it easier to understand what the `@node-oauth/oauth2-server` library supports and what it doesn't.
0 commit comments