Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

310
Views
Cómo iniciar sesión con Linkedin en ASP .Net Mvc 5

Quiero implementar el inicio de sesión de Linkedin en mi aplicación. Uso Owin.Security.Providers, Owin.Security.Providers.Linkedin

Mi inicio.Auth:

 app.UseLinkedInAuthentication(new LinkedInAuthenticationOptions() { ClientId = "my_client_id", ClientSecret = "my_client_secret" });

Mi aplicación Linkedin:

aplicación

Autenticación de la aplicación

Cuando hago clic en Iniciar sesión con Linkedin y presiono el botón "Permitir"

Iniciar sesión en Linkedin

El programa llega a estos códigos.

 // GET: /Account/ExternalLoginCallback [AllowAnonymous] public async Task<ActionResult> ExternalLoginCallback(string returnUrl) { var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(); if (loginInfo == null) { return RedirectToAction("Login"); } // Sign in the user with this external login provider if the user already has a login var result = await SignInManager.ExternalSignInAsync(loginInfo, isPersistent: false); var user = await UserManager.FindByEmailAsync(loginInfo.Email); switch (result) { case SignInStatus.Success: return RedirectToStep(user); case SignInStatus.LockedOut: return View("Lockout"); case SignInStatus.RequiresVerification: return RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = false }); case SignInStatus.Failure: default: // If the user does not have an account, then prompt the user to create an account ViewBag.ReturnUrl = returnUrl; ViewBag.LoginProvider = loginInfo.Login.LoginProvider; //return View("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { Email = loginInfo.Email }); return RedirectToAction("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { Email = loginInfo.Email }); } }

Pero el método que coloqué a continuación devuelve nulo

 var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();

Sin embargo, los mismos códigos funcionan bien con el inicio de sesión de Facebook.

quisiera saber que me recomiendan

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!