Skip to content
This repository was archived by the owner on Apr 26, 2025. It is now read-only.

fix: correct lang parameter condition in redirectToLogin #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kori000
Copy link

@Kori000 Kori000 commented Mar 13, 2025

Issue Description

In the redirectToLogin method, there's an error in the logic for passing the lang parameter. The current code binds the lang parameter to the existence of the state parameter:

...parameters?.state ? { lang: parameters.lang } : {},

This causes the lang parameter to be passed only when the state parameter exists, making it ineffective when passing only the lang parameter.

Fix

Modified the condition to make the lang parameter's transmission depend only on the existence of the lang parameter itself:

...parameters?.lang ? { lang: parameters.lang } : {},

With this change, the lang parameter will be correctly passed to the authorization URL regardless of whether the state parameter is provided.

@Kori000
Copy link
Author

Kori000 commented Apr 24, 2025

Hi @frankie567

Just a gentle follow-up on this PR. Could you please take a look when you have time? It's a small bug fix that might benefit other users.

Thank you for your time and the great project!

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

Successfully merging this pull request may close these issues.

1 participant