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
45
votes
6 answers

"An access token is required to request this resource" while accessing an album / photo with Facebook php sdk

I am using the php sdk to access a user's albums and photos in a website. I am able to login and also able to retrieve all the info about the albums and photos. However, I am not able to display these photos on the webpage. When I try the graph API,…
Alloi
  • 663
  • 2
  • 7
  • 10
45
votes
4 answers

How to validate Azure AD security token?

The following code gives me Azure AD security token, I need to validate that token is valid or not. How to achieve this? // Get OAuth token using client credentials string tenantName = "mytest.onmicrosoft.com"; string authString =…
Neo
  • 15,491
  • 59
  • 215
  • 405
45
votes
8 answers

Instagram returning "Matching code was not found or was already used" when using OAuth

I am trying to use the Instagram OAuth using the developer documentation at https://www.instagram.com/developer/authentication/. Step 1 and 2 are working without any problems, so I have my Client-ID, the Client-Secret, the Redirect-URI and the…
sma
  • 479
  • 1
  • 6
  • 12
44
votes
1 answer

Session management : How to generate Authentication token for REST service ? (Jersey)

I am trying to implement session management in my REST service. I came to know these guidelines while surfing : Not using server side sessions - it violates the RESTful principle. Using HTTP Basic authentication - Not possible right now, as I am…
dev
  • 11,071
  • 22
  • 74
  • 122
44
votes
2 answers

Configure the authorization server endpoint

Question How do we use a bearer token with ASP.NET 5 using a username and password flow? For our scenario, we want to let a user register and login using AJAX calls without needing to use an external login. To do this, we need to have an…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
43
votes
4 answers

Should I obfuscate OAuth consumer secret stored by Android app?

My Android app contains OAuth consumer secret for Twitter's API. At the moment it's in .properties file in plain text, so it takes zero effort for someone to look it up in APK. Should I take steps to obscure it (like, rot13 or stored in obfuscated…
Pēteris Caune
  • 43,578
  • 6
  • 59
  • 81
43
votes
5 answers

How to make Facebook Login possible in Django app ?

I have created a Django application. The app has a login functionality. Can somebody help to find a way to make it possible to login using Facebook credential or point me some tutorials to implement it ?
rv_k
  • 2,383
  • 7
  • 39
  • 52
43
votes
3 answers

Sign in with Google temporarily disabled for this app

We are facing the below screen when trying to authenticate to Google. The app that we are trying to authenticate is used for internal development and we did not publish it to our users. Any idea why this occurs? We faced an Unverified App screen…
Ranjani
  • 1,015
  • 1
  • 9
  • 15
43
votes
3 answers

How to store access token? (Oauth 2, Auth code flow)

From what i understand the purpose of the Authorization Code flow is to exchange the auth code for access token. This exchange happens between the server which serves the page and authorization server so that the actual access token is not exposed…
BodzioSamolot
  • 625
  • 1
  • 5
  • 10
43
votes
5 answers

Allow OPTIONS HTTP Method for oauth/token request

I'm trying to enable oauth2 token fetching for my angular application. My configuration is working fine (authentication is working correctly for all requests, token fetching is working fine as well) but there is one problem. CORS requests require…
Wojtek Wysocki
  • 488
  • 1
  • 5
  • 9
43
votes
8 answers

Authentication for REST web services

I'm starting to design a REST web service, and am unclear on the best approach to authentication. The service will allow individual users to access/manage their own data, so some type of user authentication is required. I've been looking at these…
user2943799
  • 947
  • 2
  • 13
  • 23
42
votes
7 answers

Is there anyway to programmatically fetch a zipball of private github repo?

We got a necessity to fetch a zipball of a private repo. For public ones it's pretty easy either through GitHub API or manually (https://github.com/user/repo/zipball/master). But what about private repos? Not exactly obvious how to do it even having…
jayarjo
  • 16,124
  • 24
  • 94
  • 138
42
votes
5 answers

What's the point of a timestamp in OAuth if a Nonce can only be used one time?

I had at first misinterpreted the timestamp implementation of OAuth into thinking that it meant a timestamp that was not within 30 seconds past the current time would be denied, it turned out this was wrong for a few reasons including the fact that…
MetaGuru
  • 42,847
  • 67
  • 188
  • 294
42
votes
7 answers

OAuth - What exactly is a resource owner? When is it not an end-user?

The term "resource owner" is defined in the OAuth v2.0 Specification, as "An entity capable of granting access to a protected resource. When the resource owner is a person, it is referred to as an end-user." My question is, when is a resource owner…
smartcaveman
  • 41,281
  • 29
  • 127
  • 212
42
votes
7 answers

Securing REST API on Play framework and OAuth2

I am developing an application with Play 2.0 and Scala that exposes some REST API. These APIs will be used by different applications, web, mobile or desktop, so the OAuth protocol (OAuth2) seems the most suitable. Also I would initially use an…
Marco
  • 1,642
  • 3
  • 16
  • 29