top | item 30617261

(no title)

lajr | 4 years ago

Quick question: the NextJS demo seems to be doing auth on the client side which would result in a flicker on page load while it waits to see if the user is authenticated. Do you have a server friendly component in the react library? Other libraries (ex: auth0) have a special function which is deployed as a getServerSideProps function on each page, as well as an API route that handles auth requests.

discuss

order

mhamann|4 years ago

Great point! Thanks for the observation. Unfortunately, at the moment, we only have the client-side handlers built, but we do plan to add support for server-side rendering in the authenticated state.

For now, you can use our `is_initializing` flag to wait until the authenticated state is fully loaded before completing the render in the browser. I realize that's not an optimal solution for this use case. We'll get there!