File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
src/runtime/server/routes/oidc Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ import { version } from '../../package.json'
3232// Access the plugin through the composable
3333const oidc = useOidc ()
3434// Or through injected variable
35- const { $oidc } = useNextApp ()
35+ const { $oidc } = useNuxtApp ()
3636console .log (' (composable) isLoggedIn:' , oidc .isLoggedIn )
3737console .log (' (injected) isLoggedIn:' , $oidc .isLoggedIn )
3838 </script >
Original file line number Diff line number Diff 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())
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments