Skip to content

Commit e882e96

Browse files
committed
updating samples
1 parent de5fd97 commit e882e96

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

samples/VanillaJS/public/code-identityserver-sample.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,24 @@ document.getElementById('popupSignout').addEventListener("click", popupSignout,
2727
Oidc.Log.logger = console;
2828
Oidc.Log.level = Oidc.Log.DEBUG;
2929

30+
var url = window.location.origin;
31+
3032
var settings = {
31-
//authority: 'https://demo.identityserver.io/',
32-
authority: 'http://localhost:5000/',
33+
//authority: 'https://demo.identityserver.io',
34+
authority: 'http://localhost:5000',
35+
//authority: 'http://35.246.79.26/openid-connect-server-webapp',
3336
client_id: 'js_code',
34-
redirect_uri: 'http://localhost:15000/code-identityserver-sample.html',
35-
post_logout_redirect_uri: 'http://localhost:15000/code-identityserver-sample.html',
37+
//client_id: 'client0',
38+
redirect_uri: url + '/code-identityserver-sample.html',
39+
post_logout_redirect_uri: url + '/code-identityserver-sample.html',
3640
response_type: 'code',
37-
scope: 'openid profile email api1',
41+
//response_mode: 'fragment',
42+
scope: 'openid profile',
3843

39-
popup_redirect_uri:'http://localhost:15000/code-identityserver-sample-popup-signin.html',
40-
popup_post_logout_redirect_uri:'http://localhost:15000/code-identityserver-sample-popup-signout.html',
44+
popup_redirect_uri: url + '/code-identityserver-sample-popup-signin.html',
45+
popup_post_logout_redirect_uri: url + '/code-identityserver-sample-popup-signout.html',
4146

42-
silent_redirect_uri:'http://localhost:15000/code-identityserver-sample-silent.html',
47+
silent_redirect_uri: url + '/code-identityserver-sample-silent.html',
4348
automaticSilentRenew:true,
4449
//silentRequestTimeout:10000,
4550

@@ -121,7 +126,7 @@ function endSigninMainWindow() {
121126
}
122127

123128
function startSigninMainWindowDiffCallbackPage() {
124-
mgr.signinRedirect({state:'some data', redirect_uri: 'http://localhost:15000/code-identityserver-sample-callback.html'}).then(function() {
129+
mgr.signinRedirect({state:'some data', redirect_uri: url + '/code-identityserver-sample-callback.html'}).then(function() {
125130
log("signinRedirect done");
126131
}).catch(function(err) {
127132
log(err);

samples/VanillaJS/public/identityserver-sample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ var settings = {
3333
redirect_uri: 'http://localhost:15000/identityserver-sample.html',
3434
post_logout_redirect_uri: 'http://localhost:15000/identityserver-sample.html',
3535
response_type: 'id_token token',
36+
//response_mode:'fragment',
3637
scope: 'openid profile email api',
3738

3839
popup_redirect_uri:'http://localhost:15000/identityserver-sample-popup-signin.html',

samples/VanillaJS/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var app = express();
1212

1313
var static = express.static(path.join(__dirname, 'public'));
1414
app.use(function (req, res, next) {
15-
res.set('Content-Security-Policy', "default-src 'self' https://demo.identityserver.io http://localhost:5000");
15+
//res.set('Content-Security-Policy', "default-src 'self' https://demo.identityserver.io http://localhost:" + port);
1616
next();
1717
});
1818
app.use(static);

0 commit comments

Comments
 (0)