Skip to content
Back

How can I verify user in backend using next.js?

  • 0
  • Web
  • Cloud
Adanalee01
12 Jan, 2025, 11:44

I am using next.js and google oauth2 login. I have /api/addUserToTeam for example. But I want to verify if user got an invite from that team, or if the team does not exist create a new team. But I need to get user session key and get the userid from appwrite api with the key on the backend. How can I do this?

TL;DR
Developers using next.js wanting to verify users in the backend with google oauth2 integration can achieve this by utilizing user session keys to access the userid from the appwrite API. This way, developers can ensure that users have the necessary permissions or create new teams if needed.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more