Jquery

Version 1.0 Released June 22, 2017 View changelog View on Github

This is jQuery sample code to make API requests with ID.me using OAuth 2.0

You will need an ID.me developer account to complete this process

Prerequisites

1

You must include jquery and ID.me’s javascript dependencies in your application

2

You must have node installed

Dependencies

jQuerry

1<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.0.min.js"></script>

ID.me

1<script src="https://s3.amazonaws.com/idme/developer/idme-buttons-2.0.1/assets/js/idme-modal.min.js" type="text/javascript"></script>

Installation

1

Log in to your ID.me developer account and follow the prompts to use the button generator

2

Set your client configuration settings in idme.js with the values provided within your developer account

1data-scope = 'SCOPE'
2// possible scope values: "military", "student", "responder", "government", "teacher"
3
4data-client-id = 'YOUR_CLIENT_ID'
5data-redirect = `YOUR_REDIRECT_ID`
6data-response = `RESPONSE`
7// possible values: "code", "token"
8
9data-op = `OP`
10// possible values: "signin", "signup"
11
12data-text = `OFFER_DESCRIPTION_TEXT`
13data-display = 'DISPLAY'
14// possible values: "popup", "link"
15
16data-show-verify = 'SHOW'
17// possible values: "true", "false"
3

Run the following within the directory of the sample code:

$npm install -g serve
>serve -p 3000
4

View the app at http://localhost:3000