Questions tagged [oauth]

OAuth (Open Authorization) is a specification for client applications to access protected resources on behalf of a user. It was developed as an alternative to users handing out their login credentials to third-party applications.

Description

OAuth is an open standard for authorization. OAuth provides client applications a 'secure delegated access' to server resources on behalf of a resource owner. It specifies a process for resource owners to authorize third-party access to their server resources without sharing their credentials. Designed specifically to work with Hypertext Transfer Protocol (HTTP), OAuth essentially allows access tokens to be issued to third-party clients by an authorization server, with the approval of the resource owner, or end-user. The client then uses the access token to access the protected resources hosted by the resource server. OAuth is commonly used as a way for web surfers to log into third party web sites using their Google, Facebook or Twitter passwords, without worrying about their access credentials being compromised.

OAuth is a service that is complementary to, and therefore distinct from, OpenID. OAuth is also distinct from OATH, which is a reference architecture for authentication, not a standard.

Resources

20112 questions
49
votes
2 answers

What is the difference between id_token and access_token in Auth0

In Auth0 you can use refresh tokens. In this link, we can see many returned parameters: lock.showSignin({ authParams: { scope: 'openid offline_access' } }, function (err, profile, id_token, access_token, state, refresh_token) { // store…
Scott Coates
  • 2,462
  • 5
  • 31
  • 40
48
votes
7 answers

Automating access token refreshing via interceptors in axios

We've recently discussed an axios' interceptor for OAuth authentication token refresh in this question. What the interceptor should do is intercept any response with the 401 status code and try to refresh the token. With that in mind, the next thing…
Dawid Zbiński
  • 5,521
  • 8
  • 43
  • 70
48
votes
6 answers

How to interact with back-end after successful auth with OAuth on front-end?

I want to build small application. There will be some users. I don't want to make my own user system. I want to integrate my application with oauth/oauth2.0. There is no problem in integration of my front-end application and oauth 2.0. There are so…
Sharikov Vladislav
  • 7,049
  • 9
  • 50
  • 87
48
votes
3 answers

ASP.NET Web API social authentication for Web and Mobile

My question is kind of complex so bear with me as I try to lay it out nicely what I am struggling with. Goal Have an ASP.NET website that lets users register & sign-in via Username/Password or Social (Facebook, Twitter, Google, etc) that also has an…
Travyguy9
  • 4,774
  • 8
  • 43
  • 63
48
votes
3 answers

OAuth 2: separating resource server and authorization server

The OAuth 2 spec leads me to believe that the "resource server" and "authorization server" do not necessarily have to be the same application but I'm struggling to figure out how this is actually implemented in practice. As an example, suppose the…
scttnlsn
  • 2,976
  • 1
  • 33
  • 39
47
votes
4 answers

How to authenticate with Google via OAuth 2.0 in a popup?

Sorry for a big edit. I am starting over as I am not stating my question correctly. I am trying to write a client side app in HTML5. I do not want it to be hosted on a website. I am not even sure this is possible, I am fairly new to this type of…
esac
  • 24,099
  • 38
  • 122
  • 179
47
votes
2 answers

OAuth (Access Token) Vs API Key

I have came across lots of articles and many suggesting to use OAuth over API Key. From my understanding, in OAuth, we are finally getting access token and it is valid for many days. One example is, QuickBooks online OAuth token is valid for 6…
user10
  • 5,186
  • 8
  • 43
  • 64
47
votes
2 answers

What is the purpose of the 'state' parameter in OAuth authorization request

In OAuth, the initial authorization request has a state parameter. Apparently it's there for security reasons, but I don't really understand against what it protects... For instance, on GitHub the description of this parameter is: An unguessable…
Thomas Levesque
  • 286,951
  • 70
  • 623
  • 758
47
votes
2 answers

What is the relationship between owin and oAuth2.0?

I study external login strategies and the terminology confuses me. What's the relation between the following. Owin OauthWebSecurity OAuth 2.0 Owin Katana ASP.NET Identity
cnz81
  • 694
  • 1
  • 6
  • 15
47
votes
3 answers

How to integrate OAuth with a single page application?

When using OAuth (2) I need a redirection endpoint in my application that the OAuth-offering service can redirect to, once I have been authenticated. How do I handle this in a single page application? Of course, a redirect to the OAuth-offering…
Golo Roden
  • 140,679
  • 96
  • 298
  • 425
47
votes
5 answers

AngularJS + OAuth

I'm trying to write a login solution for my Angular App, This means to allow the user to connect via Facebook/Google/Twitter or Register normally. I found Angular-OAuth to be useful, but it didn't seem to work with Facebook (or Twitter). Anyone…
Asaf
  • 8,106
  • 19
  • 66
  • 116
47
votes
7 answers

Why is Google Oauth returning `invalid redirect_urI` in my Rails app?

I'm adding Google Oauth2 to a Rails app, but have been unable to get past the early stages. I've set up an app, and defined client ID and secret.But I'm getting Invalid parameter value for redirect_uri: Non-public domains not allowed:…
Andy Harvey
  • 12,333
  • 17
  • 93
  • 185
46
votes
2 answers

Why is OAuth designed to have request token and access token?

In the OAuth protocol, a service consumer will ask a user to authorize a request token in the service provider domain, then exchanges the request token for a access token from the service provider. I'm wondering why OAuth is designed to have two…
Morgan Cheng
  • 73,950
  • 66
  • 171
  • 230
46
votes
4 answers

application that uses OAuth and javascript

I am planning to create an app that uses JavaScript and it needs to use OAuth to authenticate user for a website. Can anyone help me out please? Any sample code? I know about the Google Code Javascript OAuth library but I am not sure how to…
Viswa
  • 1,357
  • 3
  • 18
  • 30
45
votes
1 answer

Difference between OAuth 2.0 Two legged and Three legged implementation

Can you please explain me the Difference between OAuth 2.0 Two legged and Three legged implementation. And how to chose? Which ones for me?
Shraddha Shravagi
  • 1,096
  • 1
  • 9
  • 22