Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

272
Views
How to prevent multiple window with url https://twitter.com/i/oauth2/authorize

I'm opening a new window with url https://twitter.com/i/oauth2/authorize?scope=tweet.read%20users.read%20follows.read%20follows.write&state=state&client_id=clientID&response_type=code&code_challenge=789089&code_challenge_method=plain&redirect_uri=http://localhost:4200/app/callback

But, when the url is loaded in new window, the popupWindow.closed property is getting set to true. Hence, leading to multiple windows getting open on button click. This doesn't happen with linkedin's oauth url

if (this.popupWindow == null || this.popupWindow.closed) {
      this.popupWindow = window.open(
        `${authUrl}?${params}`,
        'twitter',
        `menubar=no,location=no,resizable=no,scrollbars=no,status=no,toolbar=no, width=${width},height=${height},top=${top},left=${left}`
      );
    } else {
      this.popupWindow.focus();
    }

How do i prevent multiple window from opening?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!