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
Copy file name to clipboardExpand all lines: README.md
+11-3
Original file line number
Diff line number
Diff line change
@@ -94,14 +94,16 @@ Before trying out the sample apps, you need to a create a service provider in th
94
94
95
95
4. Under `Allowed Grant Types` uncheck everything except `Code` and `Refresh Token`.
96
96
97
-
5. Enter `http://localhost:3000` as the `Callback Url`.
97
+
5. Enter the Callback URL(s). You can find the relevant callback URL(s) of each sample app in the [Running the sample apps](#2.-running-the-sample-apps) section.
98
98
99
99
6. Check `Allow authentication without the client secret`.
100
100
101
101
7. Click `Add` at the bottom.
102
102
103
103
8. Copy the `OAuth Client Key`.
104
104
105
+
9. Enable CORS for the client application by following this guide (https://is.docs.wso2.com/en/5.11.0/learn/cors/).
106
+
105
107
### 2. Running the sample apps
106
108
107
109
Build the apps by running the following command at the root directory.
@@ -111,14 +113,20 @@ npm run build
111
113
112
114
#### 1. Vanilla JavaScript Sample
113
115
116
+
The *Callback URL* of this app is `http://localhost:3000`.
117
+
114
118
You can try out the Vanilla JavaScript Sample App from the [samples/vanilla-js-app](samples/vanilla-js-app). The instructions to run the app can be found [here](/samples/vanilla-js-app/README.md)
115
119
116
120
#### 2. React Sample
117
121
122
+
The *Callback URL* of this app is `regexp=(http://localhost:3000/sign-in|http://localhost:3000/dashboard)`.
123
+
118
124
You can try out the React Sample App from the [samples/react-js-app](samples/react-js-app). The instructions to run the app can be found [here](/samples/react-js-app/README.md)
119
125
120
126
#### 2. Java Webapp Sample
121
127
128
+
The *Callback URL* of this app is the URL of this app on the server. For instance, if your Tomcat server is running on `http://localhost:8080`, then the callback URL will be `http://localhost:8080/java-webapp`.
129
+
122
130
You can try out the Java Webapp Sample App from the [samples/java-webapp](samples/java-webapp). The instructions to run the app can be found [here](/samples/java-webapp/README.md)
123
131
124
132
## APIs
@@ -176,7 +184,7 @@ Of the three methods, storing the session information in the **web worker** is t
176
184
|`oidcSessionIFrame`|`string`| `"/oidc/checksession"`| The URL of the OIDC session iframe.
177
185
|`revoke`|`string`| `"/oauth2/revoke"`| The endpoint to send the revoke-access-token request to.
178
186
|`token`|`string`|`"/oauth2/token"`| The endpoint to send the token request to.|
179
-
|`wellKnown`|`string`|`"/oauth2/oidcdiscovery/.well-known/openid-configuration"`| The endpoint to receive the OIDC endpoints from|
187
+
|`wellKnown`|`string`|`"/oauth2/oidcdiscovery/.well-known/openid-configuration"`| The endpoint to receive the OIDC endpoints from|
180
188
181
189
```javascript
182
190
auth.initialize(config);
@@ -191,7 +199,7 @@ This method returns the information about the authenticated user as an object. T
191
199
|`email`|`string`|The email address of the user|
192
200
|`username`|`string`| The username of the user|
193
201
|`displayName`|`string`| The display name of the user|
194
-
`allowedScopes`|`string`| The scopes the user has authorized the client to access|
202
+
`allowedScopes`|`string`| The scopes the user has authorized the client to access|
0 commit comments