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
136
votes
8 answers

Difference between OAuth 2.0 "state" and OpenID "nonce" parameter? Why state could not be reused?

OAuth 2.0 defines "state" parameter to be sent in request by client to prevent cross-site request attacks. Same is mentioned in OpenID spec for "nonce". Apart from the fact that "nonce" is returned in ID token instead of query parameters, they…
dvsakgec
  • 3,514
  • 4
  • 28
  • 35
135
votes
5 answers

OpenID vs. OAuth

Possible Duplicate: What's the difference between OpenID and OAuth? What is really the difference between OpenID and oAuth? They look just the same to me. I should clarify, I'm planning to use them in drupal, if that makes any difference. So I…
loop
  • 1,407
  • 2
  • 10
  • 4
134
votes
5 answers

GitHub OAuth2 Token: How to restrict access to read a single private repo

Use-case: Command-line application (which is deployed to a 3rd party machine) needs to be able to download a tarball copy of a private repo that belongs to an organization via the GitHub API (v3) Application should only be able to access this one…
Bounce2thaOunce
  • 1,341
  • 2
  • 8
  • 3
126
votes
13 answers

Do Facebook Oauth 2.0 Access Tokens Expire?

I am playing around with the Oauth 2.0 authorization in Facebook and was wondering if the access tokens Facebook passes out ever expire. If so, is there a way to request a long-life access token?
Jared Brown
  • 1,949
  • 4
  • 20
  • 28
124
votes
4 answers

Facebook Access Token for Pages

I have a Facebook Page that I want to get some things from it. First thing are feeds and from what I read they are public (no need for access_token). But I want to also get the events... and they aren't public and need the access_token. I don't want…
123
votes
2 answers

OAuth Authorization vs Authentication

OAuth terminology has been bothering me a long time now. Is OAuth Authorization as some would suggest or is it Authentication? Correct me if I'm wrong but I have always read Authorization as being the act of allowing someone access to a resource…
edgarhsanchez
  • 1,433
  • 2
  • 12
  • 9
123
votes
20 answers

How can I download a single raw file from a private github repo using the command line?

On the CI server, I want to fetch a config file that we maintain on Github so it can be shared between many jobs. I'm trying to get this file via curl, but these approaches both fail (I get a 404): # As advised by the oAuth docs curl -H…
Matt Gibson
  • 14,616
  • 7
  • 47
  • 79
121
votes
10 answers

Get user info via Google API

Is it possible to get information from user's profile via Google API? If it is possible, which API should I use? I'm interesting in such information: Url to the user profile (e.g. https://profiles.google.com/115063121183536852887); Gender…
glagola
  • 2,142
  • 3
  • 17
  • 20
121
votes
6 answers

Where to store the refresh token on the Client?

My SPA application uses the following architecture (source): This assumes that my client application knows about the refresh token, because I need it to request a new access token if no user credentials (e.g. email/password) are present. My…
Robin Wieruch
  • 14,900
  • 10
  • 82
  • 107
116
votes
7 answers

Is there any JSON Web Token (JWT) example in C#?

I feel like I'm taking crazy pills here. Usually there's always a million library and samples floating around the web for any given task. I'm trying to implement authentication with a Google "Service Account" by use of JSON Web Tokens (JWT) as…
Levitikon
  • 7,749
  • 9
  • 56
  • 74
114
votes
17 answers

Twitter oAuth callbackUrl - localhost development

Is anyone else having a difficult time getting Twitters oAuth's callback URL to hit their localhost development environment. Apparently it has been disabled recently. http://code.google.com/p/twitter-api/issues/detail?id=534#c1 Does anyone have a…
Markus
110
votes
1 answer

OAuth with Verification in .NET

I'm trying to create a .NET-based client app (in WPF - although for the time being I'm just doing it as a console app) to integrate with an OAuth-enabled application, specifically Mendeley (http://dev.mendeley.com), which apparently uses 3-legged…
John
  • 5,452
  • 8
  • 37
  • 37
109
votes
6 answers

Curl error 60, SSL certificate issue: self signed certificate in certificate chain

I try to send curl request with my correct APP_ID, APP_SECRET etc. to the …
Victor Bocharsky
  • 11,930
  • 13
  • 58
  • 91
105
votes
7 answers

What is the length of the access_token in Facebook OAuth2?

I searched on Google and StackOverflow to find a answer to my question but I can't find one. I'd like to store the access_token to my database for offline access and I'd like to be sure to specify the correct length of my column. I can't even find…
Cyril N.
  • 38,875
  • 36
  • 142
  • 243
104
votes
3 answers

client secret in OAuth 2.0

To use google drive api, I have to play with the authentication using OAuth2.0. And I got a few question about this. Client id and client secret are used to identify what my app is. But they must be hardcoded if it is a client application. So,…
Bear
  • 5,138
  • 5
  • 50
  • 80