mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 13:54: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 {
|
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({
|
const ticket = await verifier.verifyIdToken({
|
||||||
idToken: token,
|
idToken: token,
|
||||||
audience
|
audience
|
||||||
|
|||||||
Reference in New Issue
Block a user