Open Misiu opened 2 years ago
@Misiu we now have the next-auth example with server side and client access token retrieve
@baotoq thank you for the update. One question about session management before I jump into code. This is a typical situation with the next-auth. Let's say your front is trying to make 5 requests to a protected API using an expired access token. The first call will get 401, then it will use the refresh token to obtain a new access token and new refresh token and finally will succeed, but the rest of the requests will use the old refresh token and will fail to refresh the access and refresh tokens. How will that work in your code?
I didn't watch your repo for a long time, but now I see many good things, especially .NET * and Aspire. Definitively will dig into the code :)
have no idea how other people do it. but will copy some best practices from other repos
Is your feature request related to a problem? Please describe. I was searching for a clean way to use ASP. NET 5 API protected by identity server 4 in Nextjs. I found your. Repo, but sadly there is no sample how to use the secured API in next. I need SSR, SSG and client side usage.
Describe the solution you'd like Ideally the next example should show how to register and login using Identity Server 4 and Authnext and how to call protected API using nextjs on both client side and server side (Ssr).
Describe alternatives you've considered No alternatives :)
Additional context