vouch / vouch-proxy

an SSO and OAuth / OIDC login solution for Nginx using the auth_request module
MIT License
2.92k stars 327 forks source link

Landing Page Before Auth Handoff? #567

Closed jiriteach closed 3 months ago

jiriteach commented 3 months ago

Hi - I had a question around if its possible to have a landing page before the auth handoff. I have Vouch running well linked with auth from Azure AD.

I woud like to have a landing page instead of the instant direction onto Azure AD - Browser to - example1.com > landing page mentioning auth with a button to click > Vouch > Azure > Vouch > onto proxied App Browser to - example2.com > landing page mentioning auth with a button to click > Vouch > Azure > Vouch > onto proxied App

Is something like this possible? and if so - whats would be required in NGINX? I can easily enough create a landing page.

Thanks

bnfinet commented 3 months ago

Yes it should be possible and fairly straightforward.

Replace the 302 redirect to VP's login with a redirect to your preferred intermediary login screen. And then have the URL that is loaded when the user clicks the button be the VP login URL. You'll need to carry forward the variables that VP will use, such as the original destination URL and the error vars.

I'm not in a position to offer a complete example but it seems relatively easy.

jiriteach commented 3 months ago

Perfect - thanks for the pointer. Will give this a good.