arow-oss / goat-guardian

Reverse proxy that handles authentication
MIT License
39 stars 1 forks source link

add feature to redirect back to upstream if error occurs during oauth flow #4

Open cdepillabout opened 6 years ago

cdepillabout commented 6 years ago

Currently in goat-guardian, if an error occurs turning the Twitter OAuth login flow, the end-user is shown a bare-bones error page.

It would be great to have an option to redirect the user to the upstream site, so that the upstream site could display an error.

For instance, if the user is going through the Twitter OAuth login flow, after logging in at Twitter, they will be redirected back to goat-guardian with a login token from Twitter.

Goat guardian needs to check for this login token. If it doesn't exist, an error needs to be shown to the user. Currently, Goat Guardian is just showing a very simple HTTP 500 error page, but this could be improved.

Ideally, Goat Guardian would redirect the user back to the upstream site and let the upstream site display the error.

cdepillabout commented 6 years ago

I'm adding this as "after MVP", but it could be important enough to add to the MVP.

cdepillabout commented 6 years ago

This is currently only an issue for the Twitter OAuth login flow, but it will probably also be a problem when #1 is implemented for the other OAuth providers.