Updating app_metadata in a serverless application (Vercel + Nextjs)

Hi all, I’m developing a serverless application using vercel and nextjs and I want to update a user’s app_metadata when they purchase a product (allowing them access to new pages etc).

I am fairly well aware that I am unable to modify app_metadata in a serverless application due to auth0’s restrictions (for security reasons).

I am wondering how I can navigate this problem and what my options would be.

Thanks for you time.

Hi @joshuaking269,

Welcome to the Auth0 Community!

Where are you seeing this policy? Generally, you can’t update a user’s app_metadata directly from a client side application. Is that what you’re thinking?

Hi, yes I believe that the restriction is prohibiting the modification of app_metadata through a client sided application. I haven’t been able to find any way to run it “server sided” though.

A serverless function generally isn’t on the client side. You should be able to update the user from your serverless function.