DEV Community

Discussion on: The Complete Guide to Next.js Authentication

Collapse
 
marcostreng profile image
Marco Streng

Great post!

I am still struggling with a problem: If a protect a route on server-side the request to Cognito (Auth.currentAuthenticatedUser()) takes about 400-500ms. Doing the same on client-side the request takes only < 15ms. Both ways are implemented like in this example.

Maybe someone has got an idea or made a similar experience?