Skip to content

Commit

Permalink
Merge pull request #6 from appvia/logout-redirect
Browse files Browse the repository at this point in the history
Adding allowed post logout redirect URIs
  • Loading branch information
davet1985 authored Sep 11, 2019
2 parents eec2fa7 + 240234e commit 25ca735
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
- CLIENT_ID=my-client
- CLIENT_SECRET=my-secret
- CLIENT_REDIRECT_URI=http://localhost:8080/cb
- CLIENT_LOGOUT_REDIRECT_URI=http://localhost:8080
ports:
- 9090:9090
```
Expand Down
5 changes: 3 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Provider = require('oidc-provider');

const port = process.env.PORT || 3000;

const config = ['CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_REDIRECT_URI'].reduce((acc, v) => {
const config = ['CLIENT_ID', 'CLIENT_SECRET', 'CLIENT_REDIRECT_URI', 'CLIENT_LOGOUT_REDIRECT_URI'].reduce((acc, v) => {
assert(process.env[v], `${v} config missing`);
acc[camelCase(v)] = process.env[v];
return acc;
Expand All @@ -34,7 +34,8 @@ const clients = [
{
client_id: config.clientId,
client_secret: config.clientSecret,
redirect_uris: [config.clientRedirectUri]
redirect_uris: [config.clientRedirectUri],
post_logout_redirect_uris: [config.clientLogoutRedirectUri]
}
];

Expand Down

0 comments on commit 25ca735

Please sign in to comment.