first working state
This commit is contained in:
		
							parent
							
								
									0a9b76f9c7
								
							
						
					
					
						commit
						4a0db151d4
					
				
					 23 changed files with 512 additions and 74 deletions
				
			
		|  | @ -12,6 +12,20 @@ export default NextAuth({ | |||
|     }), | ||||
|   ], | ||||
|   callbacks: { | ||||
|     async signIn({ user, account, profile, email, credentials }) { | ||||
|       console.log(user, account, profile, email, credentials); | ||||
|       if (user.image != profile.image_url) { | ||||
|         await prisma.user.update({ | ||||
|           data: { | ||||
|             image: profile.image_url, | ||||
|           }, | ||||
|           where: { | ||||
|             id: user.id, | ||||
|           }, | ||||
|         }); | ||||
|       } | ||||
|       return true; | ||||
|     }, | ||||
|     async session({ session, token, user }) { | ||||
|       session.user.id = user.id; | ||||
|       // console.log(JSON.stringify(user));
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue