Open Closed

Access the login provider of the current user #3879


User avatar
0
alin.andersen created

Hey,

I need get the name of the external login provider the current user is linked to.

I found the table AbpUserLogins:

It contains all the information I need. I will need to check if the user came from a specific login provider and then do some logic.

How can I access this data? Is there a service? I found IIdentityExternalLoginAppService, but it does not have any data.

Thanks!

  • ABP Framework version: v6.0.0
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC)
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can use UserManager<Volo.Abp.Identity.IdentityUser>

    https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.usermanager-1.getloginsasync?view=aspnetcore-6.0

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    alin.andersen created

    Yes thank you! The login provider of the user can be found here: IdentityUser -> Logins -> LoginProvider

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.