openid / openid/AppAuth-JS

nodeIntegration false by default in 2021

Open
#194 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1k
Forks
165
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

[REQUIRED] Describe expected behavior

NodeJS native require() should work in root of index.html

Describe the problem

[REQUIRED] Actual Behavior

require() not a defined function

[REQUIRED] Steps to reproduce the behavior

npm run start, open dev inspection, view console

[REQUIRED] Environment
  • AppAuth-JS version: current version as of 8.15.2021
  • AppAuth-JS Environment (Node, Browser (UserAgent), ...): Electron 12.0.2
  • Source code snippts (inline or JSBin)

Fix is applied to index.ts by making the following change starting on line 27
w = new BrowserWindow(
{
width: 1280, height: 720, icon: 'assets/app_icon.png',
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
}
});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review index.ts around line 27, where the Electron BrowserWindow is configured. Run npm run start, open the developer inspection console, and reproduce the missing require() behavior. Done means the reported root index.html environment supports the expected NodeJS require() behavior in Electron 12.0.2.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.