Skip to content
Discussion options

You must be logged in to vote

Yes, in your scenario you should handle external login linking inside the User Web API, not in the MVC project.


Why?

Methods like:

_signInManager.GetExternalLoginInfoAsync()
_userManager.AddLoginAsync(user, info)

are part of ASP.NET Core Identity and require access to:

  • Identity database
  • UserManager / SignInManager
  • Authentication cookies / external login middleware

Since your MVC project cannot directly access the Identity layer or database, it should NOT perform these operations.


Correct Architecture

1. MVC Project (Frontend)

  • Handles external login flow (Google, Microsoft, etc.)
  • Receives external provider response (claims / tokens)
  • Sends data to the User Web API

2. User Web API (Ide…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Li7ye
Comment options

@Mr-AbdullahFahim
Comment options

Answer selected by Li7ye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants