Skip to content

Commit

Permalink
Merge pull request #8 from autodesk-tandem/auth_v2
Browse files Browse the repository at this point in the history
Update to use v2 of authentication API
  • Loading branch information
JimAwe authored Sep 26, 2023
2 parents 25177fe + b88e9c5 commit 8f44df1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions login.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const hide = (id) => { getElem(id).style.display="none"};


export function login() {
const scope = encodeURIComponent('data:read');
const scope = encodeURIComponent('data:read data:write user-profile:read');
doRedirection(env.forgeKey, scope);
}

Expand Down Expand Up @@ -47,7 +47,7 @@ export function checkLogin(idStr_login, idStr_logout, idStr_userProfile, idStr_v

export function doRedirection(forge_clientID, scope) {
const redirect_uri = encodeURIComponent(location.href.split('#')[0]);
location.href = `${env.forgeHost}/authentication/v1/authorize?response_type=token&client_id=${env.forgeKey}&redirect_uri=${redirect_uri}&scope=${scope}`;
location.href = `${env.forgeHost}/authentication/v2/authorize?response_type=token&client_id=${forge_clientID}&redirect_uri=${redirect_uri}&scope=${scope}`;
}

export function setTokenStorage() {
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ If you would like to use the source to debug or extend with your own test stub f

1. Clone the repository to your local machine
2. Make sure you have an account and access to at least one facility at https://tandem.autodesk.com
3. Create a new Application on the Forge Developer Portal to get your Client_ID: https://forge.autodesk.com
3. Create a new Application on the APS Developer Portal to get your Client_ID: https://aps.autodesk.com

![Tandem TestBed App 010](./docs/Readme_img_010.png)
![Tandem TestBed App 011](./docs/Readme_img_011.png)
Expand Down
2 changes: 0 additions & 2 deletions src/fac_stubs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

import * as vw_stubs from './vw_stubs.js';
import * as utils from './utils.js';

/***************************************************
Expand Down

0 comments on commit 8f44df1

Please sign in to comment.