Skip to content

Bug: isReturnToCurrentPage doesn't preserve query parameters beforelogin #423

@Upatric

Description

@Upatric

Prerequisites

Describe the issue

I want to keep query params but this config doesn't work.

{
    publicPaths: PUBLIC_PATHS,
    loginPage: "/login", // Redirect to login if unauthenticated
    isReturnToCurrentPage: true, // Return user to their requested page after login
    preserveQueryParams: true, // Preserve query parameters on redirect
 }

For example when users come to dashboard, let's say /dashboard?referrer=facebook but they are not logged in, it takes them to /login?post_login_redirect_url=%2Fdashboard and wipes the query params - but I'd love to preserve them

I am using following packages.

"@kinde-oss/kinde-auth-nextjs": "^2.6.2-5",
"@kinde-oss/kinde-typescript-sdk": "^2.10.1",

Library URL

https://github.com/kinde-oss/kinde-auth-nextjs

Library version

^2.6.2-5, the latest

Operating system(s)

Windows

Operating system version(s)

Win 11

Further environment details

No response

Reproducible test case URL

No response

Additional information

No response

Metadata

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