{"version":3,"file":"handleSignOutRequest.mjs","sources":["../../../../src/auth/handlers/handleSignOutRequest.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { appendSetCookieHeaders, createAuthFlowProofCookiesSetOptions, createLogoutEndpoint, createSignOutFlowProofCookies, resolveRedirectSignOutUrl, } from '../utils';\nexport const handleSignOutRequest = ({ oAuthConfig, userPoolClientId, origin, setCookieOptions, }) => {\n    const urlSearchParams = new URLSearchParams({\n        client_id: userPoolClientId,\n        logout_uri: resolveRedirectSignOutUrl(origin, oAuthConfig),\n    });\n    const headers = new Headers();\n    headers.set('Location', createLogoutEndpoint(oAuthConfig.domain, urlSearchParams));\n    appendSetCookieHeaders(headers, createSignOutFlowProofCookies(), createAuthFlowProofCookiesSetOptions(setCookieOptions, origin));\n    return new Response(null, {\n        status: 302,\n        headers,\n    });\n};\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;AAEY,MAAC,oBAAoB,GAAG,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,GAAG,KAAK;AACtG,IAAI,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC;AAChD,QAAQ,SAAS,EAAE,gBAAgB;AACnC,QAAQ,UAAU,EAAE,yBAAyB,CAAC,MAAM,EAAE,WAAW,CAAC;AAClE,KAAK,CAAC;AACN,IAAI,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE;AACjC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,oBAAoB,CAAC,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AACtF,IAAI,sBAAsB,CAAC,OAAO,EAAE,6BAA6B,EAAE,EAAE,oCAAoC,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AACpI,IAAI,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;AAC9B,QAAQ,MAAM,EAAE,GAAG;AACnB,QAAQ,OAAO;AACf,KAAK,CAAC;AACN;;;;"}