You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to write this up real quick, but I couldnt' figure out how to expose the .identify method from the client side launchdarkly client.
I think we should show a "Login button" example in the client component that when a user "clicks" - it changes the context from the default anonymous one, and updates the context in the cookie. We would then show how the new context is passed to the server side via cookies as well, creating a consistent login.
I tried to do this in this PR - #2, but ultimately removed the code because I couldn't get it working quite right.
The text was updated successfully, but these errors were encountered:
I think you're right we should support identify. In a Client Component, we can cast the ldClient returned from useLDClient as JSSdk and call the identify function onButtonClick. That should do it. This code should work with ssr because the button click event will not be called on server render. It will only execute on the browser. I'll try do it in js-core tomorrow.
I tried to write this up real quick, but I couldnt' figure out how to expose the .identify method from the client side launchdarkly client.
I think we should show a "Login button" example in the client component that when a user "clicks" - it changes the context from the default anonymous one, and updates the context in the cookie. We would then show how the new context is passed to the server side via cookies as well, creating a consistent login.
I tried to do this in this PR - #2, but ultimately removed the code because I couldn't get it working quite right.
The text was updated successfully, but these errors were encountered: