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.