OwinOAuthProviders | OAuth providers for Owin | OAuth library
kandi X-RAY | OwinOAuthProviders Summary
kandi X-RAY | OwinOAuthProviders Summary
OAuth providers for Owin
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of OwinOAuthProviders
OwinOAuthProviders Key Features
OwinOAuthProviders Examples and Code Snippets
Community Discussions
Trending Discussions on OwinOAuthProviders
QUESTION
I am learning to implement new custom middle ware(external login) in WebApi to authenticate user. I used empty template to learn what is actually going.
I got some good articles and external login custom middleware providers links to help me to achieve this.
- http://bitoftech.net/2014/08/11/asp-net-web-api-2-external-logins-social-logins-facebook-google-angularjs-app/
- https://www.simple-talk.com/dotnet/net-framework/creating-custom-oauth-middleware-for-mvc-5/
- https://github.com/TerribleDev/OwinOAuthProviders
- https://katanaproject.codeplex.com/SourceControl/latest#README
Based on these articles i finished custom middle ware for Github and successfully authenticated the user.
Now i need to understand how the webapi identity system authenticated the user and how the external claims are saved for this. So after successful login from third party I just created claims and call SignIn method.
Up to this all working correctly.
But after this i tried to access any protected resource using the access token (which is external access token) i got Unauthorized only. I assumed that since i am not registering the user to local database i can use the same external access token to use the resource.
I tried 2 ways. First, in the ExternalLogin method itself, i redirected to protected resource after signin. Next i tried with rest-client.
My Auth Configuration Code:
...ANSWER
Answered 2017-Feb-13 at 04:54Finally i got it. From my edit, we can understand that local token is needed to authenticate users. For this we can use Authentication.Signin() method.
Option 1: Using Authentication.Signin()
The main point here is this Authentication uses cookies to save information and bearer token to authenticate user. So we need to include the following lines in auth config
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install OwinOAuthProviders
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page