I am thinking about how I will implement authentication in my react application and even after hours of reading I still have few questions. Please provide any information you think could benefit me I would like to really understand the problem it could be that my line of reasoning somewhere implies I don't fully understand something I would appreciate if you could point out where I am wrong.
Infrastructure:
- SSR React app served behind reverse proxy on
<domain_name> - .NET 5.0 api server using asp.net identity served behind reverse proxy on
api.<domain_name> - Reverse proxy provides SSL so
https://on both
General information:
- I need to support external logins (Google, Facebook etc)
- Paying for Auth0, Okta etc is not an option
- No 3rd party apps are going to authenticate against me
- Client is web browser
- I don't need to support outdated browsers
Questions:
- Do I need IdentityServer4 at all? I am never going to act as an authentication authority for 3rd party apps.
- I can still support external logins without using IS4 right? I just need to handle redirect callback I can see there are methods such as
GetExternalLoginInfoAsync,ExternalLoginSignInAsyncwhich should make the job easier. - The reason why every SPA authentication tutorial recommends Auth Code + PKCE is because they assume you want to be authentication authority, don't have API on the same domain, or were written before SameSite cookies existed?
My plan is to write a custom login route assigning SameSite cookie and that's it. This makes client-side code super simple no shenanigans with adding access tokens to headers before making calls.
Is it possible? I found few articles describing something very similar but I am not sure.
With a setup like that is there something that is just not going to be possible? Like remote logout, banning users, or whatever you can think of.