I found that AddIdentity adds a bunch of cookies and auth schemas to the app, and I think this was interfering with what I was trying to do. However, since I still needed some of the services that are added by Identity, I changed it to AddIdentityCore and configured the EF Core stores, etc. and it now works.