Unable to make a request to a local URL from auth.ts
Unanswered
Tonkinese posted this in #help-forum
TonkineseOP
Hey guys, I'm trying to make a request to a local URL inside my
Any idea how to bypass this for my dev environment?
code:
auth.ts file, but I get the follow error:[cause]: Error [OperationProcessingError]: only requests to HTTPS are allowedAny idea how to bypass this for my dev environment?
code:
import * as client from "openid-client";
async function refreshAccessToken(token: JWT): Promise<JWT> {
try {
let server = new URL(process.env.ZITADEL_ISSUER);
let clientId = process.env.ZITADEL_CLIENT_ID;
let clientSecret = process.env.ZITADEL_CLIENT_SECRET;
> let config = await client.discovery(server, clientId, clientSecret);1 Reply
TonkineseOP
at client (src/auth.ts:35:23)
at refreshAccessToken (src/auth.ts:123:13)
at async AppRouteRouteModule.do (webpack://next/dist/src/server/route-modules/app-route/module.ts:529:14)
at async AppRouteRouteModule.handle (webpack://next/dist/src/server/route-modules/app-route/module.ts:658:30)
at async doRender (node_modules/.pnpm/next@15.0.3_@babel+core@7.26.0_react-dom@19.0.0-rc-5c56b873-20241107_react@19.0.0-rc-5c56b873-20241107/node_modules/next/src/server/base-server.ts:2504:29)
at async responseGenerator (node_modules/.pnpm/next@15.0.3_@babel+core@7.26.0_react-dom@19.0.0-rc-5c56b873-20241107_react@19.0.0-rc-5c56b873-20241107/node_modules/next/src/server/base-server.ts:3027:21)