Securing api routes in NextJs

Hi,
We are using web3auth to authenticate users on our NextJs app. It works well on the client side. What is the best approach to secure api routes on the server? Thanks in advance!

Bill



Originally posted by: billtlee

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/492

You can use the idToken returned by web3auth to secure you backend api endpoints, plz refer to this doc to know more:-
https://web3auth.io/docs/server-side-verification/



Originally posted by: himanshuchawla009