firebase-auth-cloudflare-workers icon indicating copy to clipboard operation
firebase-auth-cloudflare-workers copied to clipboard

createCustomToken

Open danjenkins opened this issue 1 year ago • 1 comments

I see createCustomToken in the tests... but I see its within a test util file.

What would it take to make createCustomToken an actual callable function within the module itself? I looked but got confused due to the emulator use etc.

danjenkins avatar Jul 18 '24 08:07 danjenkins

I see in the nextjs auth middleware they have similar functionality

https://github.com/awinogrodzki/next-firebase-auth-edge/blob/2d83441a9aa9f1ccaf15109ee69997bb2eddc605/src/auth/token-generator.ts#L40

With a crypto signer here - https://github.com/awinogrodzki/next-firebase-auth-edge/blob/2d83441a9aa9f1ccaf15109ee69997bb2eddc605/src/auth/jwt/crypto-signer.ts

But more specifically a service account signer

https://github.com/awinogrodzki/next-firebase-auth-edge/blob/2d83441a9aa9f1ccaf15109ee69997bb2eddc605/src/auth/jwt/crypto-signer.ts#L12C14-L12C34

danjenkins avatar Jul 18 '24 08:07 danjenkins