Skip to content

AuthClient is not working in production. #138

@bytemuck

Description

@bytemuck

In the docs, doing

export const adminAuthClient = new AuthClient('admin')

and then using adminAuthClient in a client component works in a development environment, but seize to work once in production because it reads directly from process.env.NEXT_PUBLIC_PAYLOAD_AUTH_URL.

It appears like process environment are injected in the browser when in development?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions