passwordless-dotnet
passwordless-dotnet copied to clipboard
Add support for assembly trimming and AOT
#130 added annotations for APIs that dynamically reference code (usually through reflection). These methods are, in essence, in compatible with trimming/AOT.
This means that the only available way to set up the raw Passwordless.dev SDK is by using this overload, which requires configuring the options manually:
public static IServiceCollection AddPasswordlessSdk(
this IServiceCollection services,
Action<PasswordlessOptions> configureOptions)
For the Identity integration package, we currently offer no way to add Passwordless.dev in a way that works with trimming/AOT.
Some of it may be a side-effect of the nature of ASP.NET Core as the foundation, but Microsoft is already rolling out certain alternative APIs to help support trimming/AOT scenarios. For example, for the configuration binding, we can use this approach to avoid reflection.