Proxy pass auth request to firebaseapp

Hi all, our application is a nuxt 3 static app running on cloudflare pages with sign in google (firebase redirect), but recently as browser starting to adopt storage partition, which makes cross domain auth storage blocked. We are trying to use this solution https://firebase.google.com/docs/auth/web/redirect-best-practices#proxy-requests. In short, proxy pass auth request from our domain to firebaseapp domain, same as below nginx config

# reverse proxy for signin-helpers for popup/redirect sign in.location /__/auth {  proxy_pass https://<project>.firebaseapp.com;}

is this achievable using cloudflare redirect? or we need implement it in worker? I’ve read this https://community.cloudflare.com/t/reverse-proxy-using-page-rules/47836/16 but still have no clue how to do it properly.
Thanks a lot!

Hey,
I just found this thread and wanted to link to this blog post I wrote which explains the necessary steps to implement a proxy for firebase authentication using a simple Cloudflare worker:
https://aronschueler.de/blog/2023/04/01/using-cloudflare-workers-as-a-proxy-for-firebase-authentication/ (backticks necessary to post links here)

I struggled with cross-domain requests too and then went this route to handle authentication in my domain via cloudflare. Works amazingly well for our application since April 2023

Wow, it helps me a lot, thank you very much!