Skip to content

Can't get sample 18 to work without using a magic code #1544

@JonathanFingold

Description

@JonathanFingold

Version

What version of the Emulator are you using: 4.4.1

Describe the bug

When I try to run the 18.Bot-authentication sample, it didn't work correctly, until I checked the Use a sing-in verification code for OAuthCards emulator setting, forcing the use of a magic code. However, the point of the sample is to show how to avoid the need for a magic code.

To Reproduce

Steps to reproduce the behavior:

  1. Register an Azure AD v1 app for use with the No x86_32 Build #18 bot. (I haven't tried reproducing with a v2 app yet.)
  2. Create a channels registration bot and add an OAuth connection for the v1 app.
  3. Update the appsettings.json file for the bot.
  4. Run the bot locally.
  5. Attach to it in the Emulator, using the bot's app ID and password. (Use the http:// endpoint.)
  6. Attempt to exercise the bot and log in.
  7. Error: The log in flow never completes correctly. (It should ask if you want to see your token.)
  8. Select the Use a sing-in verification code for OAuthCards emulator setting and restart the emulator.
  9. Try connecting to the bot again and logging in.
  10. You get a magic code to use, but now the bot appear to otherwise work correctly, in that you are asked if you want to see your token.

Expected behavior

We shouldn't have to use a magic code to get this sample to work correctly.

Screenshots

Here's the bot behavior with using the magic code:
image

Additional context

  1. I've been trying to get this to work with help from @EricDahlvang and @mingweiw.
  2. This issue means the current authentication how-to documentation is in error and is blocked from being corrected.

[bug]

Metadata

Metadata

Assignees

Labels

BugYour classic code defect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions