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

Error handling request: Error: OAuth cookie not found #2

Open
21orangehat opened this issue Feb 25, 2025 · 0 comments
Open

Error handling request: Error: OAuth cookie not found #2

21orangehat opened this issue Feb 25, 2025 · 0 comments

Comments

@21orangehat
Copy link

Hey,

Something is wrong with the auth.ts

export async function handleGithubCallback(req: Request) {
    const { response, tokens, sessionId } = await handleCallback(req);
    const userData = await getGitHubProfile(tokens?.accessToken);
    const filteredData = pick(userData, ["avatar_url", "html_url", "login"]);
    await storeUser(sessionId, filteredData);

    return response;
}

I have the error:

Error handling request: Error: OAuth cookie not found
    at handleCallback (https://jsr.io/@deno/kv-oauth/0.11.0/lib/handle_callback.ts:67:43)
    at handleCallback (https://jsr.io/@deno/kv-oauth/0.11.0/lib/create_helpers.ts:160:20)
    at handleGithubCallback (file:///home/orange/Downloads/deno-link/src/auth.ts:33:51)
    at Object.handler (file:///home/orange/Downloads/deno-link/src/router.ts:36:34)
    at eventLoopTick (ext:core/01_core.js:177:7)
    at async mapped (ext:deno_http/00_serve.ts:391:18)

Executing your code I have the same error.

Looks that something else changed in some part...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant