Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Yann
@kYann
As anyone experience this issue ?
Jacob Riley
@jriley2019_gitlab
Hello. I'm using the Salesforce provider for ASP.NET Core and having a weird issue. I previously used the OWIN provider for Salesforce with .NET 4.5 with great success. I had a need to switch my projects over to ASP.NET CORE 2.X. My local dev version works great. Once I publish and deploy to production or test server, the auth no longer works. The failure seems to be happening during the callback phase. My login call goes to my app's back end, gets redirected to Salesforce and then Salesforce makes a call back to my external login callback method, which fails. This only fails when deployed to my server. My code works flawlessly when I debug in visual studio. I've confirmed my connected apps in Salesforce are set up correctly. I've been messing with this for several weeks now and I can't seem to get anywhere. Any ideas?
I have an error message in the .NET Core IIS logs but it isn't very helpful. "System.Exception: An error was encountered while handling the remote login. ---> System.OperationCanceledException: The operation was canceled." I can provide the full log message with stack trace if needed, but I didn't want to flood the channel with it
IServiceCollection.AddAuthorization() VS IMvcCoreBuilder.AddAuthorization()
Victorio Berra
@VictorioBerra
I cloned the code. Eventually the latter calls the former.
Victorio Berra
@VictorioBerra
What is baseline.netcore.json?
Kévin Chalet
@PinpointTownes
@VictorioBerra wrong room? :smile:
Sammy Deprez
@sammydeprez
anyone who managed to get Yahoo Authentication to work?
I keep getting a "Something went wrong, Please try again another time" error....
Callback domain is not localhost
And my Startup.cs file contains the following:
.AddYahoo(yahooOptions =>
{
yahooOptions.ClientId = Configuration["Authentication:Yahoo:ClientId"];
yahooOptions.ClientSecret = Configuration["Authentication:Yahoo:ClientSecret"];
});
Jerrie Pelser
@jerriep
@sammydeprez I was responsible for creating the initial version of the Yahoo provider and it has always been tricky. I know it is not much help, but sometimes it will literally start working if you try again the next day.
Maybe things have improved on their end in the meantime, but from my experience its always been hit and miss to get it working and when it is not working their error messages aren't helpful
So to answer your question, yes I had it working at some point. But there is no guarantee I can get it working again today
Sammy Deprez
@sammydeprez
@jerriep : thx for the reply, i'll just try it again then :)
JuliaPileva
@JuliaPileva
Hi! Do you now a sample of remote sheme authentication handler(
not OAuth)?
paultechguy
@paultechguy
I scanned the list of providers and didn't spot Facebook Graph API (uses oauth2) support. Did I miss something?
Kévin Chalet
@PinpointTownes
There's already a Facebook authentication handler for ASP.NET Core developed by MSFT.
Suresh Amudalapalli
@SureshAmudalapalli
Hi, I was trying to get id_token from Google authenticator middleware ? As per the code, the response_type was mapped to code and with that, we are not able to get the id_token from api response. If I try to customise the handler by changing reponse_type to "code id_token" then it's throwing an error.
{"Message":"An error was encountered while handling the remote login.","StackTrace":" at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()\r\n at IdentityServer4.Hosting.FederatedSignOut.AuthenticationRequestHandlerWrapper.HandleRequestAsync() in C:\local\identity\server4\IdentityServer4\src\IdentityServer4\Hosting\FederatedSignOut\AuthenticationRequestHandlerWrapper.cs:line 38\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)"}
Sébastien BIAUDET
@sbiaudet
Hi all, I've wrote a shopify provider !!! PR is in progress
Kévin Chalet
@PinpointTownes
:+1:
Stefan Over
@Herdo
Hey everyone o/ Is this the right place to call out for the missing NuGet preview package of Microsoft.AspNetCore.Authentication.OAuth?
Kévin Chalet
@PinpointTownes
Oy.
Actually, it's not exactly missing.
Stefan Over
@Herdo
yeah
just found this: aspnet/AspNetCore#3756
so there won't be a 3.0.0 for the packages listed there?
Kévin Chalet
@PinpointTownes
It's just no longer a thing, like most of the ASP.NET Core packages, that are now part of the ASP.NET Core SDK :smile:
Right.
Stefan Over
@Herdo
Okay
Is it somewhere noted down that you have to remove the "old" 2.* NuGet references?
Kévin Chalet
@PinpointTownes
No idea.
Ask the ASP.NET folks? :smile:
Stefan Over
@Herdo
yeah, probably :D
Thanks anyway ^^
Kévin Chalet
@PinpointTownes
You're welcome :smile:
Matthew D. Groves
@mgroves
I'm trying out the LinkedIn provider today and it's working great, thank you!
The next thing I want to do is call the LinkedIn API to get additional information about the logged in user. To do this, I need the OAuth key. Where can I get this after the user has logged in to my site?
(I need to use the OAuth key to ask for an access key, which I can then use to make API request to the LinkedIn API)
it's entirely possible i'm going about this the wrong way, of course, but I'm trying to get information like "job title" and "company" from the linkedin profile
Martin Costello
@martincostello
I think that the OAuth key will be in the claims that come back once the user signs in. If you need to do an additional API call manually you can use that token to do that and get the data you want, but if you add any appropriate extra scopes needed to the Scope property when you configure LinkedIn auth, it'll fetch those for you. I think you'll need to register the additional claim mappings as well so they get picked up from the response correctly and added to the claims.
Matthew D. Groves
@mgroves
@martincostello there isn't an OAuth key in the "Claims" collection upon returning. However, the claim/scope stuff sounds promising. Where can I read more about that? I see ClaimActions and Scope in options, but I'm really sure how to proceed
options.Scope.Add(?) options.ClaimActions.Add(?)
Martin Costello
@martincostello
@mgroves So here's the built-in bits: https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/blob/81d383ed2b407e47eb4c219c2487bc0b0e0c1721/src/AspNet.Security.OAuth.LinkedIn/LinkedInAuthenticationOptions.cs#L36-L49 Once you work out what the relevant claims and scopes you need are from the LinkedIn API documentation, then you can map the relevant response fields to claim names of your choosing. This example response in the tests may help: https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers/blob/dev/test/AspNet.Security.OAuth.Providers.Tests/LinkedIn/bundle.json
There's also the SaveTokens property which you might need to set to true to get access to the keys.
Matthew D. Groves
@mgroves
ah!
okay that looks very helpful, thank you
Julien LEICHER
@YuukanOO
Hi there!
Julien LEICHER
@YuukanOO
Do you know if there's a way to append a query param when redirecting from a RemoteAuthenticationHandler ?
Julien LEICHER
@YuukanOO
Nevermind, figured it out by using options.Events.OnTicketReceived and overriding the TicketReceivedContext.ReturnUri :)