alitehami / oauth-walkthrough-2.legged.auth

2-Legged Authentication walkthrough: Learn how to use two-legged authentication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Two-Legged Authentication sample

Node.js npm Platforms License

oAuth2

Description

This sample is part of the 2-Legged Authentication Walkthrough.

This sample illustrates how to use two-legged authentication.

Thumbnail

thumbnail

Setup

Prerequisites

  1. A Forge account: Getting Started with Forge
  2. A text editor of your choice. (For example Brackets or Visual Studio Code are good choices.)
  3. A basic knowledge of :
    • HTML and CSS
    • JavaScript ES6
    • Command-line programs
      • Node.js Command Line (for Windows users)
      • Terminal (for Mac/Linux/Unix users)

Running locally

Install NodeJS (version 8 or newer).

Clone this project or download it. It's recommended to install GitHub desktop.

To run it, install the required packages, set the enviroment variables with your client ID & secret and finally start it. Via command line, navigate to the folder where this repository was cloned and use the following:

Mac OSX/Linux (Terminal)

npm install
export FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
export FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
npm start

Windows (use Node.js command line from Start menu)

npm install
set FORGE_CLIENT_ID=<<YOUR CLIENT ID FROM DEVELOPER PORTAL>>
set FORGE_CLIENT_SECRET=<<YOUR CLIENT SECRET>>
npm start

Open a browser and navigate to http://localhost:3000.

Click on the Authorize me link.

License

This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Support

forge.help@autodesk.com

About

2-Legged Authentication walkthrough: Learn how to use two-legged authentication

License:MIT License


Languages

Language:JavaScript 78.6%Language:HTML 21.4%