mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 12:04:02 +00:00
fix(bot): use HTTPS for OIDC audience to match Cloud Scheduler
This commit is contained in:
@@ -62,7 +62,10 @@ export function createSchedulerRequestAuthorizer(options: {
|
||||
}
|
||||
|
||||
try {
|
||||
const audience = oidcAudience ?? new URL(request.url).origin
|
||||
const origin = new URL(request.url).origin
|
||||
const audience =
|
||||
oidcAudience ??
|
||||
(origin.startsWith('http://') ? origin.replace('http://', 'https://') : origin)
|
||||
const ticket = await verifier.verifyIdToken({
|
||||
idToken: token,
|
||||
audience
|
||||
|
||||
Reference in New Issue
Block a user