Skip to content

Commit b27683e

Browse files
committed
version: 0.5.5
1 parent c4c9e52 commit b27683e

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nuxt-openid-connect",
3-
"version": "0.5.4",
3+
"version": "0.5.5",
44
"description": "An nuxt 3 module with OpenID-Connect(OIDC) integration.",
55
"keywords": [
66
"nuxt",

playground/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { version } from '../../package.json'
3232
// Access the plugin through the composable
3333
const oidc = useOidc()
3434
// Or through injected variable
35-
const { $oidc } = useNextApp()
35+
const { $oidc } = useNuxtApp()
3636
console.log('(composable) isLoggedIn:', oidc.isLoggedIn)
3737
console.log('(injected) isLoggedIn:', $oidc.isLoggedIn)
3838
</script>

src/runtime/server/routes/oidc/callback.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default defineEventHandler(async (event) => {
4343
res.end()
4444
} else if (params.code) {
4545
// Authorization Code Flow: code -> access_token
46-
logger.debug('[CALLBACK]: has code in params, code:' + params.code)
46+
logger.debug('[CALLBACK]: has code in params, code:' + params.code + ' ,sessionid=' + sessionid)
4747
const tokenSet = await issueClient.callback(callbackUrl, params, { nonce: sessionid })
4848
// logger.info('received and validated tokens %j', tokenSet)
4949
// logger.info('validated ID Token claims %j', tokenSet.claims())

src/runtime/server/routes/oidc/login.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ export default defineEventHandler(async (event) => {
2020
const sessionkey = config.secret
2121
let sessionid = getCookie(event, config.secret)
2222
if (!sessionid) {
23-
logger.trace('[Login]: regenerate sessionid')
24-
sessionid = generators.nonce() // uuidv4()
23+
sessionid = generators.nonce()
24+
logger.info('[Login]: regenerate sessionid=' + sessionid)
25+
} else {
26+
logger.info('[Login]: cookie sessionid=' + sessionid)
2527
}
2628

2729
const responseMode = getResponseMode(config)

0 commit comments

Comments
 (0)