Scarvy / apple-notes-readwise

Export Readwise highlights to Apple Notes
GNU General Public License v3.0
0 stars 0 forks source link

Open user's default browser for authentication #4

Closed Scarvy closed 5 days ago

Scarvy commented 1 week ago

Instead of opening a new BrowserWindow to authenticate a user with Readwise, we would rather open the authentication URL in the user's default browser since most users will already be logged in.

Example of open in a user's own browser

Scarvy commented 1 week ago

Switched to using shell.openExternal for opening auth URL in user's default browser and any external links (ex. documentation or emailing support)

// Open external links in the default browser
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
    shell.openExternal(url)
    return { action: 'deny' }
});