docs/versioned_docs/version-2.x/auth/nhost.md
The following CLI command will install required packages and generate boilerplate code and files for Redwood Projects:
yarn rw setup auth nhost
Update your .env file with the following setting which can be found on your Nhost project's dashboard.
NHOST_BACKEND_URL with the unique Nhost Backend URL that can be found in the app's dashboard.NHOST_JWT_SECRET with the JWT Key secret that you have set in your project's Settings > Hasura "JWT Key" section.Nhost supports the following methods:
Depending on the credentials provided:
For the docs on Authentication, see: https://docs.nhost.io/platform/authentication
If you are also using Nhost as your GraphQL API server, you will need to pass skipFetchCurrentUser as a prop to AuthProvider , as follows:
<AuthProvider client={nhost} type="nhost" skipFetchCurrentUser>
This avoids having an additional request to fetch the current user which is meant to work with Apollo Server and Prisma.
Important: The skipFetchCurrentUser attribute is only needed if you are not using the standard RedwoodJS api side GraphQL Server.