Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stop redirect loop caused by TOKEN cookie not sent #48

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions authn/github.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function mainProcess(event, context, callback) {
} // Options
),
{
sameSite: 'strict',
sameSite: 'lax',
secure: true
}
)
Expand Down Expand Up @@ -164,7 +164,7 @@ function redirect(request, headers, callback) {
"value" : cookie.serialize('TOKEN', '', {
path: '/',
expires: new Date(1970, 1, 1, 0, 0, 0, 0),
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
}],
Expand All @@ -188,7 +188,7 @@ function unauthorized(body, callback) {
"value" : cookie.serialize('TOKEN', '', {
path: '/',
expires: new Date(1970, 1, 1, 0, 0, 0, 0),
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
}],
Expand Down
8 changes: 4 additions & 4 deletions authn/openid.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function mainProcess(event, context, callback) {
), {
path: '/',
maxAge: config.SESSION_DURATION,
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
},
Expand Down Expand Up @@ -243,7 +243,7 @@ function mainProcess(event, context, callback) {
"value" : cookie.serialize('TOKEN', '', {
path: '/',
expires: new Date(1970, 1, 1, 0, 0, 0, 0),
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
},
Expand Down Expand Up @@ -327,7 +327,7 @@ function redirect(request, headers, callback) {
"value" : cookie.serialize('TOKEN', '', {
path: '/',
expires: new Date(1970, 1, 1, 0, 0, 0, 0),
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
},
Expand Down Expand Up @@ -381,7 +381,7 @@ function unauthorized(error, error_description, error_uri, callback) {
"value" : cookie.serialize('TOKEN', '', {
path: '/',
expires: new Date(1970, 1, 1, 0, 0, 0, 0),
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
},
Expand Down
8 changes: 4 additions & 4 deletions authn/pkce.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function mainProcess(event, context, callback) {
path: '/',
httpOnly: true,
secure: true,
sameSite: 'strict',
sameSite: 'lax',
maxAge: parseInt(config.SESSION_DURATION)
})
},
Expand Down Expand Up @@ -242,7 +242,7 @@ function mainProcess(event, context, callback) {
"value" : cookie.serialize('TOKEN', '', {
path: '/',
expires: new Date(1970, 1, 1, 0, 0, 0, 0),
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
},
Expand Down Expand Up @@ -341,7 +341,7 @@ function redirect(request, headers, callback) {
"value" : cookie.serialize('TOKEN', '', {
path: '/',
expires: new Date(1970, 1, 1, 0, 0, 0, 0),
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
},
Expand Down Expand Up @@ -405,7 +405,7 @@ function unauthorized(error, error_description, error_uri, callback) {
"value" : cookie.serialize('TOKEN', '', {
path: '/',
expires: new Date(1970, 1, 1, 0, 0, 0, 0),
sameSite: 'strict',
sameSite: 'lax',
secure: true
})
},
Expand Down
Loading