Adding okta authentication on nginx for any application

Hi,

we are testing by adding auth for our nginx server using okta domain. when we try to hit application server it redirects to okta login but after login it remains in the same login page. no error logs as such on the backend too. anyone help on this please?

Referred link: Use nginx to Add Authentication to Any Application | Okta Developer

app.server file


vouch.server file: