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
104
votes
1 answer

Best practices around generating OAuth tokens?

I realize that the OAuth spec doesn't specify anything about the origin of the ConsumerKey, ConsumerSecret, AccessToken, RequestToken, TokenSecret, or Verifier code, but I'm curious if there are any best practices for creating significantly secure…
mckamey
  • 17,359
  • 16
  • 83
  • 116
103
votes
7 answers

SAML vs federated login with OAuth

What's the difference between SAML and federated login with OAuth? Which solution makes more sense, if a company wants to use a third-party webapp, and but also wants single sign-on and be the authentication authority?
Chung Wu
  • 2,357
  • 3
  • 21
  • 19
99
votes
1 answer

HttpClient single instance with different authentication headers

Given that the .net HttpClient has been designed with reuse in mind and is intended to be long lived and memory leaks have been reported in short lived instances. What guide lines are there where you want to make restful calls to a given endpoint…
Bronumski
  • 14,009
  • 6
  • 49
  • 77
98
votes
2 answers

Access Lovoo API using Python

I am hoping to make use of the lovoo API, but don't really know how to start. After running Charles proxy and looking at the traffic, I have come to the following conclusion: First a GET to https://api.lovoo.com/oauth/requestToken? is sent as soon…
ChaChaPoly
  • 1,811
  • 5
  • 17
  • 39
90
votes
5 answers

What's the point of refresh token?

I have to confess I've had this question for a very long time and never really understood. Say an auth token is like a key to a safe; when it expires it's not usable anymore. Now we're given a magic refresh token, which can be used to get another…
wangii
  • 2,570
  • 1
  • 22
  • 29
88
votes
3 answers

How to secure RESTful web services?

I have to implement secure RESTful web services. I already did some research using Google but I'm stuck. Options: TLS (HTTPS) + HTTP Basic (pc1oad1etter) HTTP Digest two-legged OAuth a Cookie-based approach client certificates (Tom Ritter and…
Jan Deinhard
  • 19,645
  • 24
  • 81
  • 137
88
votes
7 answers

Multiple HTTP Authorization headers?

Is it possible to include multiple Authorization Headers in an HTTP message? Specifically, I would like to include one of Bearer token type (passing an OAuth access token) and one of Basic type (passing a base64 encoded username:password). GET…
lewiada
  • 1,397
  • 2
  • 10
  • 15
88
votes
13 answers

Google OAuth API to get user's email address?

I am playing with Google's OAuth 2.0 Playground using my own personal Google account, but I cannot seem to recover my Gmail address using the playground. The scope I am using is: email profile https://www.googleapis.com/auth/plus.login But when I…
RevolutionTech
  • 1,334
  • 2
  • 14
  • 17
87
votes
2 answers

OAuth v2 communication between authentication and resource server

I'm having some troubles understanding how OAUTH-v2 works. The OAuth version 2 spec reads: Accessing Protected Resources The client accesses protected resources by presenting the access token to the resource server. The resource server MUST…
nisc
  • 4,222
  • 4
  • 29
  • 34
87
votes
2 answers

What is the Access Token vs. Access Token Secret and Consumer Key vs. Consumer Secret

I have been using Oauth for a while but have never been completely sure of the difference between these four terms (and the functionality of each). I frequently see (for instance in the Twitter Public API) Consumer key: Consumer secret: Access…
Startec
  • 12,496
  • 23
  • 93
  • 160
85
votes
5 answers

gitlab - Push to a repository using access_token

I implemented the oauth2 web flow in order to get access_token from users of my app. With the access_token, I would like to do the following actions: Get user informations Create a repo for this user Push code to this repo (using git push …
Simon Bruneaud
  • 2,263
  • 2
  • 12
  • 24
85
votes
9 answers

Is there a way to get a user's email ID after verifying his/her Twitter identity using OAuth?

I am new to OAuth and have been playing around with the Twitter API. I am able to fetch the credentials of a user after authentication by making a request to http://api.twitter.com/1/account/verify_credentials.xml. The response contains the user id,…
Manoj Govindan
  • 72,339
  • 21
  • 134
  • 141
84
votes
3 answers

where is devise implementation of "authenticate_user!" method?

Where is devise implementation of authenticate_user! method? I have been looking for it and have not found it so far.
Greg
  • 34,042
  • 79
  • 253
  • 454
84
votes
3 answers

What is the difference between OAuth based and Token based authentication?

I thought that OAuth is basically a token based authentication specification but most of the time frameworks act as if there is a difference between them. For example, as shown in the picture below Jhipster asks whether to use an OAuth based or a…
Cemre Mengü
  • 18,062
  • 27
  • 111
  • 169
83
votes
1 answer

How to keep the OAuth consumer secret safe, and how to react when it's compromised?

This question is about trying to understand the security risks involved in implementing oauth on a mobile platform like Android. Assumption here is that we have an Android application that has the consumer key/secret embedded in the code. Assuming a…
ddewaele
  • 22,363
  • 10
  • 69
  • 82