Hello, I want to use NextjsSite construct with Cog...
# help
s
Hello, I want to use NextjsSite construct with Cognito for a demo. What do you use for Cognito auth in Next.js?
c
I'm using Amplify to get connected with my SST app
s
Make sense. I’ve integrated Amplify with Vue and NuxtJs. For React and NextJs, is NextAuth way to go or is there something better?
f
I’ve also heard the aws-cognito-next being brought up from time to time. It seems deprecated.
c
I've tried with NextAuth but remember that we switched from it because there are no IAM authentication, only for Cognito Pools. Also Amplify can sign the Headers automatically for you . @Slawomir Stec
s
thx @Casiel Didriksson Muriedas and @Frank, added amplify auth and all works fine. I’ve tried CognitoProvider from NextAuth but it redirected me to hosted UI, I was thinking this library provides more integration options.
c
Yeah, that's another reason we move out NextAuth. Amplify provides a better experience using Cognito. The bad this about Amplify IMO is they don't have a nice typescript implementation, specially on the Amplify.configure method, everything else have been working really well 😄