Skip to content

[Bug] SingletonTokenAcquisition can be removed #249

Description

@jmprieur

Which Version of Microsoft Identity Web are you using ?
Microsoft Identity Web 0.1.5-preview

AddTokenAcquisition isTokenAcquisitionSingleton parameter (never used)

public static IServiceCollection AddTokenAcquisition(
this IServiceCollection services,
bool isTokenAcquisitionSingleton = false)
is a request from the Microsoft Graph SDK which want a singleton (whereas in general that’s not such a good idea)

See https://github.com/AzureAD/microsoft-identity-web/blob/master/tests/WebAppCallsMicrosoftGraph/appsettings.json#L9

There is an alternative which is that the GraphService registers the ITokenAcquisition as a singleton (the last which does the registration)

Decision:

  • We keep AddTokenAcquisition as is
  • We remove the SingletonTokenAcquisition property from the Microsoft.Identity.Options
  • AddTokenAcquision is called with the default value (false) from the extension methods
  • Remove the tests that were testing this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions