I just add oauth in my proxy using libapache2-mod-auth-openidc, and set a HTTP header to pass user info to the server (which only accepts connections from the proxy IPs)
You can write your application in react, php, perl, bash, c, or just manually answer to http calls for all I care.