Skip to content

Commit

Permalink
feat(logout): make oauth logout optional [#488]
Browse files Browse the repository at this point in the history
  • Loading branch information
vitshev committed Nov 28, 2024
1 parent 1255e14 commit 1b5591a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/ui/src/server/components/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ export function getOAuthLoginPath(req: Request) {

export function getOAuthLogoutPath(req: Request) {
const config = getOAuthSettings(req);

if (!config.logoutPath) {
return '/api/oauth/logout/callback';
}

const host = req.get('host');
const params = new URLSearchParams({
post_logout_redirect_uri: `https://${host}/api/oauth/logout/callback`,
Expand Down

0 comments on commit 1b5591a

Please sign in to comment.