Adding Auth0.AuthenticationApi package dependency #148
Adding Auth0.AuthenticationApi package dependency #148
Auth0.AuthenticationApi package dependency #148Conversation
...Auth0.AspNetCore.Authentication/ClientInitiatedBackChannelAuthentication/Auth0CibaService.cs
Outdated
Show resolved
Hide resolved
andychiare
left a comment
There was a problem hiding this comment.
Added some suggestions to improve the presentation of the new supported features.
In particular, a reference to the two new sections in the table of contents of the EXAMPLES.md file is missing
…om Auth0.AuthenticationApi package
7808873 to
3fcb462
Compare
...Auth0.AspNetCore.Authentication/Auth0AuthenticationApiClient/Auth0AuthenticationApiClient.cs
Outdated
Show resolved
Hide resolved
| There can be multiple scenarios where the conventional authentication flows might not suffice. There could be scenarios where we need to directly call Auth0's APIs for specific tasks, such as user management or advanced authentication scenarios. | ||
| In such cases, `Auth0.AuthenticationApi` provides a powerful way to interact with Auth0's Authentication API endpoints. | ||
|
|
||
| **Note :** For interactions with the Auth0 API's end-points we leverage the rich support and infrastructure provided by `Auth0.AuthenticationApi` (via `Auth0.AspNetCore.Authentication.AuthenticationApiClient`). There is no implementation in `Auth0.AspNetCore.Authentication` that directly talks to Auth0's API endpoints. |
There was a problem hiding this comment.
I think we need to call out that, when you use the AuthenticationApiClient that there is no relation to the session/cookie and authenticated state. Both exist next to eachother without any integration.
| options.Domain = Configuration["Auth0:Domain"]; | ||
| options.ClientId = Configuration["Auth0:ClientId"]; | ||
| options.ClientSecret = Configuration["Auth0:ClientSecret"]; |
There was a problem hiding this comment.
Shouldn't these be optional? The user has already provided these, so in case they are identical we should not provide them again.
There was a problem hiding this comment.
Additionally, why is this not built on top of the builder we already have, like we have WithAccessToken?
There was a problem hiding this comment.
It is built similar to WithAccessToken(), just that the example is misleading. I will update it.
The configuration options are also not required, since it would have already been initialised.
| { | ||
| var request = new RevokeRefreshTokenRequest | ||
| { | ||
| RefreshToken = refreshToken, |
There was a problem hiding this comment.
To be useful, I think we should include how we can get the refresh token from the ASP.NET SDK.
| }; | ||
|
|
||
| await _auth0Client.StartPasswordlessEmailFlowAsync(request); | ||
| return Ok("Magic link sent to email."); |
There was a problem hiding this comment.
So the user can use this to login using passwordless. But how is the cookie going to be set? So how is the user actually going to be logged in into the app?
Description
Auth0.AuthenticationApipackage as a direct dependency.Auth0.AuthenticationApiwithout adding/managing a separate reference.AuthenticationApiClient.Internal References
Testing
Checklist
main