Customizability Identity Endpoints
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
The Identity Endpoints are currently lacking customizability due to using DTO's we can't pass extra properties.
This may be intentional and we can certainly work around that but...
I wonder if something like this is feasable:
```csharp
app.MapIdentityEndpoints()
.AddLoginEndpoint("/login") // optionally overwriting the route.
.AddRegisterEndpoint() // this will end up in the IEmailSender implementation.
...
```
* Accessing `TRequest` in the `IEmailSender` implementation might solve my previous request for `RedirectUrl`.
* With some mapping inside to map to `TUser` and some contraints / validation on the minimum required props per request. This way, our own validators can also be applied.
And leave an option for adding all endpoints at once:
```csharp
app.MapIdentityEndpointDefaults();
```
It would also be cool to be able to access re-usable methods to implement in our own API endpoints or in Blazor Server directly.
Currently it's suggested to overwrite or extend that entire class holding the endpoints with all the logic inside the endpoints.
Just an idea, let me know what you think!
Contributor guide
Assessment
This issue has not been assessed yet.