Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitch OAuth2 provider not signing in correctly #223

Closed
celluj34 opened this issue Feb 26, 2018 · 2 comments
Closed

Twitch OAuth2 provider not signing in correctly #223

celluj34 opened this issue Feb 26, 2018 · 2 comments
Labels

Comments

@celluj34
Copy link

Hello;

I am trying to implement the Twitch OAuth2 login flow, and I have tried to follow the sample in this solution. I am only using Twitch to log in, I do not have any other method currently. In the simplest solution I can create, I always get an error stating No authenticationScheme was specified, and there was no DefaultSignInScheme found. This is demonstrably incorrect as I am able to get to the Twitch login page and log in successfully.

When I run the sample project and add twitch with my clientId and clientSecret I get the same error. Google works, Twitter works, Github also fails but it looks like for a separate issue.

The error is being thrown from Microsoft.AspNetCore.Authentication.AuthenticationService.SignInAsync(). If I try to set the DefaultScheme or SignInScheme to TwitchAuthenticationDefaults.AuthenticationScheme, then I get other errors about not being able to set either of those properties to the same value.

I'm not sure where else to go from here. I would like to use this extension as it saves me a lot of work, but I can't in its current state, whether that be on the Microsoft/Security team or the one maintaining this project.

Let me know if there's any more info I can provide to help finding a solution.

@kevinchalet
Copy link
Member

If I try to set the DefaultScheme or SignInScheme to TwitchAuthenticationDefaults.AuthenticationScheme, then I get other errors about not being able to set either of those properties to the same value.

Using the OAuth2 providers as the default sign-in scheme is not a legal operation. The default sign-in scheme is usually an instance of the cookie handler.

When I run the sample project and add twitch with my clientId and clientSecret I get the same error.

That likely means there's an error in your provider as they all work the same way.

Github also fails but it looks like for a separate issue.

Yeah, the redirect_uri associated with the client app was updated. I'll remove it from the samples.

@celluj34
Copy link
Author

celluj34 commented Mar 8, 2018

That likely means there's an error in your provider as they all work the same way.

But I haven't made any changes to it, plus I'm using the example project in this repository. The only lines of code I added were the .AddTwitchAuth(...) with my clientId and clientSecret.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants