Redirect the browser after the OAuth callback
v2By setting the redirect_uri field in OauthConfig, the plugin will respond to the OAuth callback with a 302 Found status code to that URL instead of serving an inline HTML response. This is useful for landing the user on a specific page within your application (e.g., a Tauri window URL).
Important Limitation: When redirect_uri is used, the handler closure receives the localhost URL hit by the provider (e.g., http://127.0.0.1:<port>/?code=...), but it does not receive the URL fragment (#...). If your OAuth flow uses an implicit flow where the token is in the fragment, you must parse window.location on the redirected page and manually forward the result back to your app.
let config = OauthConfig {
redirect_uri: Some("http://tauri.localhost/oauth/done".into()),
..Default::default()
};