Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close browser window after sign in #35

Open
scriptPilot opened this issue Dec 11, 2021 · 2 comments
Open

Close browser window after sign in #35

scriptPilot opened this issue Dec 11, 2021 · 2 comments

Comments

@scriptPilot
Copy link

After sign in, the browser window should redirect to the local server and should be closed automatically.

@scriptPilot
Copy link
Author

I helped myself by modifying the LoopbackRedirectServer.js file:

if (req.url && url.parse(req.url).pathname === callbackPath) {                  

    // Show message after sign in instead of forwarding to another website
    res.end('Google sign in successful. You can close this browser window.')
    /*
    res.writeHead(302, {
        Location: successRedirectURL,
    });
    res.end();
    */

    resolve(url.resolve(`http://127.0.0.1:${port}`, req.url));
    this._server.close();
}

@abrshdir
Copy link

abrshdir commented Nov 1, 2022

While we are on electron there is no necessity on redirecting to other website. So I am creating a pull request to add this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants