Skip to content

Bug: Non-SvelteKit style access to environment variables #59

Open
@colinbate

Description

Prerequisites

Describe the issue

As part of issue #36 a new environment variable was added to the lib/hooks/sessionHooks.ts file. That change attempts to use process.env, which isn't available in all environments that SvelteKit may be running in.

This should be changed to the SvelteKit mechanism used elsewhere in the SDK:

import { env } from "$env/dynamic/private";

// ...
{ domain: env.KINDE_COOKIE_DOMAIN, /* ... */ }

I can make a PR if that is preferred.

Library URL

https://github.com/kinde-oss/kinde-sveltekit-sdk

Library version

2.1.0

Operating system(s)

macOS

Operating system version(s)

Sequoia 15.1

Further environment details

Cloudflare Pages

Reproducible test case URL

No response

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions