question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OAuth emulation presents a blank child window when clicking the authenticate button of the OAuth card

See original GitHub issue

Version

4.2.1

Describe the bug

So I started reporting this bug on the back of the initial issue where the OAuth endpoint was not working at all, but it’s clear now that this needs to be its own bug. The details are as follows:

Clicking the authenticate button of the OAuth card results in a blank child window being popped up which dead ends the entire authentication process making the OAuth emulation unusable.

To Reproduce

Steps to reproduce the behavior:

  1. Have the bot send out the OAuth card
  2. Click on the authenticate button in the card
  3. Stare at the blank child window and wonder what you did wrong 😜

Expected behavior

I would expect the same, default behavior as the v3 emulator which would be to generate an emulated auth token and trigger the TokenResponse event within the bot with that token. No actual sign in UI need be popped up.

Screenshots

image

Additional context

Users are also experiencing this as is evidenced by this StackOverflow Question.

[bug]

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
drub0ycommented, Feb 7, 2019

@justinwilaby Thanks for giving me some of your time today. I just want to follow up with what we discovered so the details are here whenever you’re able to return to this issue.

At first, when I attempted to repro this for you, suddenly everything worked as expected. I later determined this was because I was not connected to the network and this must be triggering some behavior to fail which then causes the correct behavior to succeed.

What we determined is that there are two pieces of code responsible for enriching an OAuth card coming from the bot:

  1. oauthLinkEncoder which is the one that is setting the oauthlink: protocol and fetching the signin link by calling through the getUserSignIn process. This encoder is run as part of the replyToActivity middleware.
  2. oauthClientEncoder which is the one that sets the oauth: protocol and correctly takes the connectionName out of the Activity and embeds it in the link. The encoder is run as part of the Conversation::processActivity.

When the emulator is online, #1 - oauthLinkEncoder always wins. When offline, #2 - oauthClientEncoder always wins.

The expectation is that, in this specific scenario, #2 - oauthClientEncoder should always be winning.

1reaction
justinwilabycommented, Feb 11, 2019

The root cause has been located thanks to the hard work and persistence from @drub0y. Starting the fix now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

oauthCard login opens empty window - Stack Overflow
When I run the bot in bot emulator framework, I see the login button. When I click on it however, it just opens...
Read more >
NetSuite Applications Suite - OAuth 2.0 Tasks for Administrators
Manually Creating a Supply Chain Snapshot Simulation ... Blank Value Field for Category Product Mapping in NetSuite Connector · Removing or Resetting Data ......
Read more >
OAuth – Asana
Open the developer console (also accessible by clicking on your profile photo in the Asana app, then selecting "My Settings" > Apps >...
Read more >
SailPoint IdentityIQ Administration Guide
IdentityIQ supports the use of OAuth 2.0 (client credentials) as a token-based protocol for API authentication. Use this feature to create and manage...
Read more >
Embedded Data - Qualtrics
This element shows the page the respondent was on when they clicked the survey link. For most emailed surveys, you will see a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found