Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Conversation

@a-b-r-o-w-n
Copy link
Contributor

Description

  • Caches the token required to fetch tenants so that multiple sign ins are not required.
  • Fixes an issue provisioning and publishing with the web app

Task Item

fixes #6595
fixes #6614

Copy link
Contributor

@beyackle beyackle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny thing, but otherwise this looks great.

@coveralls
Copy link

coveralls commented Mar 31, 2021

Coverage Status

Coverage increased (+0.006%) to 52.065% when pulling 1bea1eb on abrown/select-tenant into 586d33d on main.

beyackle
beyackle previously approved these changes Mar 31, 2021
const getDefaultFormData = (currentProfile, defaults) => {
return {
choice: defaults.choice ?? 'create',
tenantId: currentProfile?.tenantId ?? defaults.tenantId,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably overthinking this, but I noticed that you clear the other fields when the tenantId changes. Here, this chooses between the profile tenant and the default. If we choose one or the other, would we want to use all the tenant-bound values from that choice? (i.e. I choose the profile tenantId and so I want to choose the subscriptionId from the profile and not the default?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could actually just be tenantId: currentProfile?.tenantId because we won't ever set the tenant id with the defaults.

GeoffCoxMSFT
GeoffCoxMSFT previously approved these changes Apr 1, 2021
@@ -1,4 +1,5 @@
process.env.DEBUG = 'composer*';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonyanziano I removed this. Was it there for a good reason? Just trying to cut down on the noise in the test output!

@cwhitten cwhitten merged commit 76075db into main Apr 2, 2021
@cwhitten cwhitten deleted the abrown/select-tenant branch April 2, 2021 19:22
@cwhitten cwhitten mentioned this pull request May 20, 2021
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
…#6628)

* make dropdown width same as dropdown element

* do not require sign in every time fetching tenants

* open dev tools after the app is ready

* do not populate dropdowns if token is null

* hide tenant selection when tokens are user provided

* rename method for clarity

* refactor how form data is used

* make seeding form data more resiliant

* fix issue where page was not set correctly

* allow publishing from web

* store tenant id in publish profiles for token based users

* add test for using cached tenant token

* disable resource group downdop for existing profiles

* remove useless if statement

* Fix function name

* update name for clarity

* remove default tenant id

* add isGetTokensFromUser for compatibility with 3p extensions

* revert lint-staged config

Co-authored-by: Ben Yackley <61990921+beyackle@users.noreply.github.com>
Co-authored-by: Chris Whitten <christopherwhitten@gmail.com>
Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[3/29 bugbash] [Cumulative issue] Repeating auth prompts - 2 main issues Azure provision in webapp is broken

7 participants