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
With the popularity of AWS Amplify for creating quickly backend (files, lambda functions, auth through Cognito…) and host apps, it would be great to add direct support to it through nuxt-auth module.
What does the proposed changes look like?
With this integration, we will be able to easily protect pages and set up which ones require login by checking authentication status through aws cognito.
The code leverage withSSRContext to make it compatible with nuxt SSR mode.
When using the @aws-amplify/ui-components package for the UI, then almost everything is already handled for you and the only requirement is to call await this.$auth.fetchUser() after login from the UI component. But it would be better to expose more of the amplify methods for flexibility around implementation.
Amplify can be used for more than just auth purpose, meaning one might need to call Amplify.configure() before the auth scheme gets mounted. So far, I’ve found the best way to share the config between other components and the scheme (both client and server-side), was to leverage the store. Just something to keep in mind when working on the PR.
What problem does this feature solve?
With the popularity of AWS Amplify for creating quickly backend (files, lambda functions, auth through Cognito…) and host apps, it would be great to add direct support to it through nuxt-auth module.
What does the proposed changes look like?
With this integration, we will be able to easily protect pages and set up which ones require login by checking authentication status through aws cognito.
For now, I typically create my own middleware which is far from being as clean as nuxt-auth.
I'm wondering if the best approach is to add support through nuxt-auth or if a new nuxt-amplify would make more sense.
The text was updated successfully, but these errors were encountered: