Search code examples
node.jsfirebasenext.jsfirebase-authenticationvercel

How to set custom user claims for Firebase Auth user in Vercel edge functions?


Firebase admin SDK is not supported on Vercel edge functions so how can I set custom user claims in Firebase auth user if I have uid and id token?


Solution

  • I find it funny that @machavity deleted OP's answer. I'm mentioning the solution again:

    setCustomUserClaims method can be used from next-firebase-auth-edge library.

    For more details: https://github.com/awinogrodzki/next-firebase-auth-edge/issues/32