Skip to content

Commit

Permalink
feat: delete refresh cookie when logout.
Browse files Browse the repository at this point in the history
  • Loading branch information
aborn committed May 26, 2023
1 parent 5399a38 commit 2ee487b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default defineNuxtConfig({
debug: false, // optional, default is false
response_type: 'id_token', // or 'code'
secret: 'oidc._sessionid',
isCookieUserInfo: false,
cookie: { loginName: '' },
cookiePrefix: 'oidc._',
cookieEncrypt: true,
Expand Down
1 change: 1 addition & 0 deletions src/runtime/server/routes/oidc/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default defineEventHandler((event) => {
const { config } = useRuntimeConfig().openidConnect
deleteCookie(event, config.secret)
deleteCookie(event, config.cookiePrefix + 'access_token')
deleteCookie(event, config.cookiePrefix + 'refresh_token')
deleteCookie(event, config.cookiePrefix + 'user_info')

// delete part of cookie userinfo (depends on user's setting.).
Expand Down

0 comments on commit 2ee487b

Please sign in to comment.