Skip to content

Commit

Permalink
#2096 Fix keycloak documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkey authored and Romakita committed Sep 22, 2022
1 parent 3381666 commit 067bc60
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/tutorials/keycloak.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,7 @@ import session from "express-session";
cors(),
compress({}),
cookieParser(),
methodOverride(),
session({
secret: "some secret",
resave: false,
saveUninitialized: true,
store: this.keycloakService.getMemoryStore()
})
methodOverride()
]
})
export class Server {
Expand All @@ -123,6 +117,12 @@ export class Server {
protected settings: Configuration;

$beforeRoutesInit(): void {
this.app.use(session({
secret: "thisShouldBeLongAndSecret",
resave: false,
saveUninitialized: true,
store: this.keycloakService.getMemoryStore()
}));
this.app.use(this.keycloakService.getKeycloakInstance().middleware());
}
}
Expand Down

0 comments on commit 067bc60

Please sign in to comment.