How to use the "--oauth-redirect" flag?

I’ve got an app where I want to redirect users after login back to the page they were previously on. By default Panel seems to log people in and then send them to the main page and even if I set the --oauth-redirect flag it doesn’t send them to that page (just back to the main page).

I want to redirect users back to the exact page they were on before they went through the login, including any query strings (I sync state to the URL). Is this possible in the current release?