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
228
votes
14 answers

OAuth: how to test with local URLs?

I am trying to test OAuth buttons, but they all (Facebook, Twitter, LinkedIn) come back with errors that seem to signal that I can not test or use them from a local URL. How do people usually work in development with OAuth stuff if they all seem to…
Awesomeness
  • 2,501
  • 3
  • 18
  • 18
222
votes
5 answers

Why do access tokens expire?

I am just getting started working with Google API and OAuth2. When the client authorizes my app I am given a "refresh token" and a short lived "access token". Now every time the access token expires, I can POST my refresh token to Google and they…
levi
  • 23,693
  • 18
  • 59
  • 73
215
votes
10 answers

What exactly is OAuth (Open Authorization)?

What exactly is OAuth (Open Authorization)? I have gleaned some information from OAuth Twitter Tutorial: What is OAuth And What It Means To You What is OAuth But I want to learn and know more. I'm looking for info on the lifecycle. Why do most of…
user372724
205
votes
9 answers

What is the difference between the OAuth Authorization Code and Implicit workflows? When to use each one?

OAuth 2.0 has multiple workflows. I have a few questions regarding the two. Authorization code flow - User logs in from client app, authorization server returns an authorization code to the app. The app then exchanges the authorization code for…
divyanshm
  • 6,600
  • 7
  • 43
  • 72
204
votes
6 answers

How to validate an OAuth 2.0 access token for a resource server?

When a client asks a resource server to get a protected resource with an OAuth 2.0 access token, how does this server validate the token? The OAuth 2.0 refresh token protocol?
Ack
  • 2,233
  • 3
  • 16
  • 17
197
votes
5 answers

SSO with CAS or OAuth?

I wonder if I should use the CAS protocol or OAuth + some authentication provider for single sign-on. Example Scenario: A User tries to access a protected resource, but is not authenticated. The application redirects the user to the SSO server. If…
deamon
  • 89,107
  • 111
  • 320
  • 448
193
votes
5 answers

Creating an API for mobile applications - Authentication and Authorization

Overview I'm looking to create a (REST) API for my application. The initial/primary purpose will be for consumption by mobile apps (iPhone, Android, Symbian, etc). I've been looking into different mechanisms for authentication and authorization…
jsuggs
  • 2,632
  • 3
  • 19
  • 17
190
votes
4 answers

JWT (Json Web Token) Audience "aud" versus Client_Id - What's the difference?

I'm working on implementing OAuth 2.0 JWT access_token in my authentication server. But, I'm not clear on what the differences are between the JWT aud claim and the client_id HTTP header value. Are they the same? If not, can you explain the…
Chris Swain
  • 5,193
  • 5
  • 21
  • 22
188
votes
12 answers

How can I verify a Google authentication API access token?

How can I verify a Google authentication access token? I need to somehow query Google and ask: Is [given access token] valid for the [example@example.com] Google account? Short version It's clear how an access token supplied through the Google…
Jon Cram
  • 16,609
  • 24
  • 76
  • 107
187
votes
7 answers

Architecture for merging multiple user accounts together

Okay, I got a website where you can register yourself and login. You can also login with your facebook, twitter or linkedin account. It is important that users only have one account registered. So somehow, I want to merge the accounts of users if…
P.T.
  • 3,130
  • 4
  • 19
  • 24
153
votes
5 answers

Google OAuth 2.0 redirect_uri with several parameters

How to add a parameters to the Google OAuth 2.0 redirect_uri? Just like this: redirect_uri=http://www.example.com/redirect.html?a=b The b of a=b is random. Anyone can help ?
eason
  • 2,854
  • 3
  • 16
  • 18
152
votes
17 answers

Facebook login message: "URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings."

Important notice: If you register for testing, go to your profile settings and to your interests add delete profile. Trying to login with Facebook to my website: I get the following error: URL Blocked: This redirect failed because the redirect URI…
Amir Rahbaran
  • 2,380
  • 2
  • 21
  • 28
148
votes
5 answers

How to securely store access token and secret in Android?

I am going to use oAuth to fetch mails and contacts from google. I don't want to ask the user each time to log in to obtain an access token and secret. From what I understood, I need to store them with my application either in a database or…
yeahman
  • 2,737
  • 4
  • 21
  • 25
144
votes
2 answers

Securing my REST API with OAuth while still allowing authentication via third party OAuth providers (using DotNetOpenAuth)

I have a product with a straightforward REST API so that users of the product can directly integrate with the product's features without using my web user interface. Recently I have been getting interest from various third parties about integrating…
Nathan Ridley
  • 33,766
  • 35
  • 123
  • 197
142
votes
14 answers

OAuth secrets in mobile apps

When using the OAuth protocol, you need a secret string obtained from the service you want to delegate to. If you are doing this in a web app, you can simply store the secret in your data base or on the file system, but what is the best way to…
Felixyz
  • 19,053
  • 14
  • 65
  • 60