'signUp from 'next-auth/react' doesn't exist
I'm trying to create a sign up page and currently integrate signup with google with nextauth.
I have been able to integrate signIn with nextAuth and able to sign in (However not able to create an actual user on the database...)
with:
import { getProviders, signIn as SignIntoProvider } from 'next-auth/react';
where signIn exists in next-auth/react-- when searching for signUp or newUser, it doesn't exist... is there any other place where I should be looking for?
As there is supposed to be signIn, signUp, and signOut. I'm not able to access signUp for some reason...
Solution 1:[1]
The signUp function doesn't exists, but you can use NextAuth callbacks to save the user on your database.
When a user sign in, query the db to check if it already exists, and if it doesn't, you create it.
Here is the documentation reference of how to use the signIn callback:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gustavo Galupo |
