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

Restrict what popupOptions fields are used #383

Merged
merged 1 commit into from
Mar 9, 2017
Merged

Conversation

hzalaz
Copy link
Member

@hzalaz hzalaz commented Mar 9, 2017

For now only width and height

@hzalaz hzalaz added this to the v8-Next milestone Mar 9, 2017
For now only width and height
@codecov-io
Copy link

codecov-io commented Mar 9, 2017

Codecov Report

Merging #383 into master will increase coverage by 0.17%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #383      +/-   ##
==========================================
+ Coverage   97.51%   97.68%   +0.17%     
==========================================
  Files          34       34              
  Lines        1166     1166              
  Branches      195      195              
==========================================
+ Hits         1137     1139       +2     
+ Misses         29       27       -2
Impacted Files Coverage Δ
src/web-auth/popup.js 93.87% <100%> (+1.02%)
src/helper/parameters-whitelist.js 100% <0%> (+9.09%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b7f43a...e5c280e. Read the comment docs.

@hzalaz hzalaz merged commit 749f09c into master Mar 9, 2017
@hzalaz hzalaz deleted the changed-popup-options branch March 9, 2017 21:43
@hzalaz hzalaz modified the milestones: v8-Next, v8.4.0 Mar 10, 2017
@anulman
Copy link
Contributor

anulman commented Apr 28, 2019

@hzalaz @luisrudge why was the decision made to only cover width & height? I would love to see more options, especially a top and left that override the default computations.

Rationale: I tried to call webAuth.popup.authorize(...) from a Chrome extension's background script, but it causes the popup to open near top=0&left=0 because the caller has no window position.

In order to position the popup in the intended center, I must window.open(...) to a local HTML file that exists solely to call webAuth.authorize. I cannot even use Lock directly in this window, because Chrome Extensions' CSP does not permit loading Lock from the CDN.

(This Lock indirection makes the handling for initialScreen extra awkward, but that's another Issue for another day. I'm presently monkeypatching webAuth.client.buildAuthorizeUrl to append it as a search param, which throws an error on the auth page 😂)

@luisrudge
Copy link
Contributor

luisrudge commented Apr 28, 2019 via email

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

Successfully merging this pull request may close these issues.

None yet

4 participants