All Projects → IntuitDeveloper → OAuth2-Go

IntuitDeveloper / OAuth2-Go

Licence: Apache-2.0 license
OAuth2 sample app using Go

Programming Languages

go
31211 projects - #10 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to OAuth2-Go

OAuth2.0-demo-nodejs
A sample demo app to showcase the OAuth2.0 and openID Connect authorization workflows using an express app
Stars: ✭ 23 (+21.05%)
Mutual labels:  oauth2, quickbooks
SampleOAuth2 UsingPythonClient
Django Sample app using Python OAuth client
Stars: ✭ 23 (+21.05%)
Mutual labels:  oauth2, quickbooks
Spring Cloud Shop
spring cloud 版分布式电商项目,全力打造顶级多模块,高可用,高扩展电商项目
Stars: ✭ 248 (+1205.26%)
Mutual labels:  oauth2
Simpler
Simpler是一款轻量级的第三方微博应用,具有微博的基础功能,兼有外观优雅,运行流畅,内存占用低,省电省流量等特点。
Stars: ✭ 27 (+42.11%)
Mutual labels:  oauth2
python-tokens
Python library to manage OAuth access tokens
Stars: ✭ 14 (-26.32%)
Mutual labels:  oauth2
Api Security Checklist
Checklist of the most important security countermeasures when designing, testing, and releasing your API
Stars: ✭ 16,339 (+85894.74%)
Mutual labels:  oauth2
logto
🧑‍🚀 Logto helps you build the sign-in, auth, and user identity within minutes. We provide an OIDC-based identity service and the end-user experience with username, phone number, email, and social sign-in, with extendable multi-language support.
Stars: ✭ 3,421 (+17905.26%)
Mutual labels:  oauth2
Oauth
A library for performing OAuth Device flow and Web application flow in Go client apps.
Stars: ✭ 244 (+1184.21%)
Mutual labels:  oauth2
instagram-oauth-nodejs-server
Node.js server for Intagram-API OAuth purpose.
Stars: ✭ 12 (-36.84%)
Mutual labels:  oauth2
QuickBooks-V3-Java-SDK
Java SDK for QuickBooks REST API v3 services
Stars: ✭ 49 (+157.89%)
Mutual labels:  quickbooks
psd2
API client for banks supporting PSD2 APIs with OAuth2 authentication.
Stars: ✭ 26 (+36.84%)
Mutual labels:  oauth2
oauth2-nodejs
Sample App acting as an OAuth2 client using Intuit APIs
Stars: ✭ 60 (+215.79%)
Mutual labels:  quickbooks
oauth-jsclient
Intuit's NodeJS OAuth client provides a set of methods to make it easier to work with OAuth2.0 and Open ID
Stars: ✭ 102 (+436.84%)
Mutual labels:  quickbooks
remix-auth
Simple Authentication for Remix
Stars: ✭ 929 (+4789.47%)
Mutual labels:  oauth2
Light Oauth2
A fast, light and cloud native OAuth 2.0 authorization microservices based on light-4j
Stars: ✭ 247 (+1200%)
Mutual labels:  oauth2
fastapi-azure-auth
Easy and secure implementation of Azure AD for your FastAPI APIs 🔒 B2C, single- and multi-tenant support.
Stars: ✭ 174 (+815.79%)
Mutual labels:  oauth2
Authing
🔥Authing - IDaaS/IAM solution that can Auth to web and mobile applications.
Stars: ✭ 247 (+1200%)
Mutual labels:  oauth2
OAuth2 PHP
PHP sample app for OAuth2
Stars: ✭ 32 (+68.42%)
Mutual labels:  quickbooks
Slack
[READ ONLY] Subtree split of the SocialiteProviders/Slack Provider (see SocialiteProviders/Providers)
Stars: ✭ 11 (-42.11%)
Mutual labels:  oauth2
wiresteward
Wireguard peer manager
Stars: ✭ 50 (+163.16%)
Mutual labels:  oauth2

Sample Banner

OAuth2 - Go Sample App

The Intuit Developer team has written this OAuth 2.0 Sample App in Go programming language to provide working examples of OAuth 2.0 concepts, and how to integrate with Intuit endpoints.

Table of Contents

Requirements

In order to successfully run this sample app you need a few things:

  1. Go installation
  2. A developer.intuit.com account
  3. An app on developer.intuit.com and the associated client id and client secret.

First Use Instructions

  1. go get -d github.com/IntuitDeveloper/OAuth2-Go
  2. Fill in the config.json file values (clientId, clientSecret) by copying over from the keys section for your app.

Running the code

Once the sample app code is on your computer, you can do the following steps to run the app:

  1. Install the sample using the following commands
    cd $GOPATH/src/github.com/IntuitDeveloper/OAuth2-Go
    go install
  2. Run the sample by using one of the two commands below
    $GOPATH/bin/OAuth2-Go
    or
    OAuth2-Go
  3. Wait until the terminal output displays the "running server on :9090" message.
  4. Your app should be up now in http://localhost:9090/
  5. The oauth2 callback endpoint in the sample app is http://localhost:9090/oauth2redirect
  6. To run the code on a different port, update the property "port" in config.json. Also make sure to update the redirectUri in config.json and in the Developer portal ("Keys" section).

Configuring the callback endpoint

You'll have to set a Redirect URI in the Developer Portal ("Keys" section). With this app, the typical value would be http://localhost:9090/oauth2redirect, unless you host this sample app in a different way (if you were testing HTTPS, for example).

Note: Using localhost and http will only work when developing, using the sandbox credentials. Once you use production credentials, you'll need to host your app over https.

Getting the OAuth Tokens

The sample app supports the following flows:

Sign In With Intuit - this flow requests OpenID only scopes. Feel free to change the scopes being requested in config.json. After authorizing (or if the account you are using has already been authorized for this app), the redirect URL (/oauth2redirect) will parse the JWT ID token, and make an API call to the user information endpoint.

Connect To QuickBooks - this flow requests non-OpenID scopes. You will be able to make a QuickBooks API sample call (using the OAuth2 token) on the /connected landing page. Sample implementation for RefreshToken and RevokeToken is also available in that page.

Get App Now (Connect Handler) - this flow requests both OpenID and non-OpenID scopes. It simulates the request that would come once a user clicks "Get App Now" on the apps.com website, after you publish your app.

Scope

It is important to ensure that the scopes your are requesting match the scopes allowed on the Developer Portal. For this sample app to work by default, your app on Developer Portal must support Accounting scopes. If you'd like to support both Accounting and Payment, simply add thecom.intuit.quickbooks.payment scope in the config.json file.

Storing the tokens

This app stores all the tokens and user information in a cache. For production ready app, tokens should be encrypted and stored in a database.

Discovery document

The app calls the discovery API during starup and loads all the endpoint urls. For production ready app, make sure to run this API once a day to get the latest urls.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].