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.

Filter by
Sorted by
Tagged with
16
votes
2answers
9k views

Generating (presumably) unique `nonce` fields for Twitter OAuth

This is code that's part of a library (closed source) that I have that generates a unique nonce value for Twitter OAuth. Essentially, it generates a random number, ...
14
votes
1answer
15k views

OAuth Provider token generation

I'm currently creating an OAuth provider in Java using Jersey. To the best of my knowledge Jersey does not provide a method to create oauth tokens so I'm creating my own. For those unfamiliar with ...
10
votes
3answers
1k views

Inserting OAuth data into a database

I am totally new to PHP. I just wrote a PHP script for google oauth to pull the data and insert into my database. I don't know if my code is vulnerable to SQL injection. Should I have used prepared ...
8
votes
4answers
2k views

API method to validate Facebook OAuth token

I am new to Java / OOP and I'm concerned that I have a method which is doing far too much "stuff" - but I don't easily see how it can be shortened in a way which is not contrived / arbitrary. This is ...
7
votes
2answers
242 views

Querying Facebook for details of a user's OAuth token

This class exposes the public method getAuthToken which takes a user's Facebook OAuth token as an input parameter and queries Facebook for information about it - ...
7
votes
1answer
405 views

OAuth2 Implementation

I am trying to implement an OAuth2 service. I am not planning to use it anytime soon (like will write unit tests). This is my fun project I do to practice. I have used the python_jwt library to create ...
7
votes
1answer
10k views

Identity OAuth implementation with Owin

I am building an MVC 5 application using code-first Entity Framework 6 and a customised ASP.NET Identity model for authentication. I will only be authenticating against external OAuth providers (...
7
votes
1answer
1k views

Prevent multiple async calls from all attempting to refresh an expired OAuth token

I have some code that needs to access an API that requires OAuth authorization in the form of a token, and every time the token expires, it needs to be refreshed. I made a function called ...
5
votes
1answer
393 views

Nodejs async with express server

I use the following code which works as expected. The code uses open ID connect to login user. Because I'm pretty new to node and express, it will be great if I can ...
5
votes
1answer
99 views

Google oAuth Angular service

I wrote a module with 3 services that execute the oauth (and set the api key) for the google api and return the token object if the promise is positive. Here is the whole working module: ...
5
votes
0answers
1k views

OAuth2 login for ASP.NET Core without local accounts

I am using OAuth2 for users to sign in with their Google Account and authenticate Google API requests. I have not used the built-in ASP.NET Identity provider because this requires an app database of ...
4
votes
1answer
516 views

Using Wreq and Lens libraries to query Prosper for account info

I am trying to create a program to manage my Prosper investments for me as an intro to Haskell project. I created a post a few weeks ago for some of the simpler backend calculations: Recommend Next ...
4
votes
1answer
50 views

Youtube OAuth security

I am working with Youtube OAuth for the first time and I am not that great when it comes to security. I got the following code and would like to hear if you guys can find any security issue: ...
4
votes
1answer
299 views

Rails service + OAuth

I'm having trouble structuring the logic of OAuth integration into my web app. In the app, a user creates a Report that consists of data from their Google Analytics ...
4
votes
0answers
37 views

Get current user middleware from JWT using express

I'm using Sequelize and Google oAuth for authentication, I want to create a middleware that Verifies the sent token passed in the headers matches the one the user was initially signed to. Finds the ...
4
votes
0answers
772 views

OAuth 2.0 implicit flow implementation

I have been implementing the OAuth 2.0 implicit flow to secure the API I use in an Angular SAP. Please, could you review my code? I am sure there is a lot of stuff to improve in it. I have separated ...
3
votes
1answer
506 views

Slack App OAuth flow in golang

I'm working on a Slack app that uses Slash Commands. I've been looking for an excuse to learn Go, but the online tour was a little slow paced so I tried jumping in with this project. I'm looking for ...
3
votes
1answer
52 views

Script that saving most relevant Youtube video for each database object

Due to the tightened Youtube API daily quota (that allows to use only ~ 98 search requests per project daily) I've implemented a multi-project system. For this to work you need to create a project/...
3
votes
1answer
144 views

Node.js command line app to init a repo

In order to learn more about Node.js and promises I followed a tutorial on Sitepoint about building a command line app. I liked the idea and simplicity of Node so I decided to build my own that ...
3
votes
0answers
47 views

Node/Express authenticate Google email address

Trying to set up express server that will authenticate a user's Google email before proceeding. The code below works, but is there any way to make it more elegant? The whole ...
3
votes
0answers
88 views

OAuth 1.0 signature using Ramda

I created an OAuth 1.0 signature generator using Ramda based on this. I'm just getting to grips with it, so was wondering if someone more familiar with Ramda and functional programming would give me ...
2
votes
1answer
64 views

Login system in PHP using AJAX

I am beginning the cycle of creating my role based access control into my framework. I now want to log the user into my application and my _user table looks like this: ...
2
votes
1answer
3k views

Facebook OAuth in WPF

I am developing a WPF application that requires me to get an Access Token from Facebook using oAuth. After much searching online, I came to the following conclusions: OAuth must be done in a browser ...
2
votes
0answers
23 views

Google Mailer app inside Django using OAuth 2.0

I have built this Django Package which is an alternative for sending mail to users using Gmail API. Everything is working fine. But the verify(self, request) method inside ...
2
votes
0answers
32 views

Implementation of OAuth2 device flow using Python

Please review this program because I wrote something in Python for the first time. This code is to be used for device authorization in oauth2 device flow. ...
2
votes
0answers
240 views

Google OAuth Boilerplate in Python Tornado

I recently started a project using python-tornado, and needed to implement google OAuth to manage user logins. I struggled getting this working in the context of the project, and decided to abstract ...
2
votes
0answers
6k views

Securing Web API using token authentication and allowing external application to post or get data

Implementing OAuthAuthentication with OWIN and Identity to secure Web API and let external application like Chrome Extension to access our self hosted API for getting and posting data through our ...
2
votes
0answers
59 views

oAuth2 token creation when registering new user

I am working on Django Rest Framework for backend to develop android app. My project is about Food Delivery System. My app has user login and registration feature. I preferred oAuth2 for token based ...
2
votes
0answers
90 views

Base class for the Oauth process and dance

At work we are interfacing with the Jira cloud storage for our ticket management system. I created a base class to make the process easier on the user side, and I did my best to make it re-usable and ...
1
vote
1answer
133 views

Instagram Basic Display API Full Example PHP

Here's an example script I wrote for Instagram (Facebook)'s Basic Display API. I did this for myself because I haven't used Instagram's API since their Legacy API was disabled, and I needed to ...
1
vote
0answers
32 views

Secure GraphQL API with REST auth layer

I have created a REST auth layer in front of my GraphQL API, I would like to know if it is secure enough or if I can improve anything, I will be adding more auth providers, in the end this API will ...
1
vote
0answers
49 views

Oauth2 Connector Frappe Framework

My first attempt at writing a Python application to solve a real problem is a one way connector between ERPNext and MYOB AccountRight. This is the module I have written to connect to the API and get ...
1
vote
0answers
61 views

OAuth2.0 Client framework

I'v developed a OAuth2.0 Client. The initial goal was to make a simple client where people won't have to focus on it to much ,and where they can start coding their product immediately by just ...
0
votes
1answer
103 views

Auth token SSL implementation

...