{"id":22870009,"url":"https://github.com/autodesk-platform-services/aps-pkce-webapp","last_synced_at":"2026-03-19T23:52:27.534Z","repository":{"id":188316332,"uuid":"678457262","full_name":"autodesk-platform-services/aps-pkce-webapp","owner":"autodesk-platform-services","description":"Sample: Sample to obtain a 3LO using PKCE flow in a single page app","archived":false,"fork":false,"pushed_at":"2024-06-05T13:24:30.000Z","size":418,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-06T16:57:36.876Z","etag":null,"topics":["authentication","authorization","pkce-oauth","token"],"latest_commit_sha":null,"homepage":"https://autodesk-platform-services.github.io/aps-pkce-webapp/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/autodesk-platform-services.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-14T15:43:41.000Z","updated_at":"2024-06-05T13:24:34.000Z","dependencies_parsed_at":"2023-08-14T22:07:00.529Z","dependency_job_id":"c29f079d-0063-4cdc-8a18-7c60a7315068","html_url":"https://github.com/autodesk-platform-services/aps-pkce-webapp","commit_stats":null,"previous_names":["autodesk-platform-services/aps-pkce-webapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autodesk-platform-services%2Faps-pkce-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autodesk-platform-services%2Faps-pkce-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autodesk-platform-services%2Faps-pkce-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/autodesk-platform-services%2Faps-pkce-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/autodesk-platform-services","download_url":"https://codeload.github.com/autodesk-platform-services/aps-pkce-webapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246460073,"owners_count":20781042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","authorization","pkce-oauth","token"],"created_at":"2024-12-13T13:13:21.289Z","updated_at":"2026-02-06T07:35:56.450Z","avatar_url":"https://github.com/autodesk-platform-services.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PCKE client-side only\n\n## Introduction\n\nThe purpose of this sample is demonstrate a quick way to test and obtain your three legged tokens using PKCE method in the context of a single page app (you can refer [here](https://aps.autodesk.com/en/docs/oauth/v2/tutorials/get-3-legged-token-pkce/) for more details).\n\n## Why PKCE?\n\nAs said by [Petr Broz](https://github.com/petrbroz) in [this blog post](https://aps.autodesk.com/blog/new-application-types):\n\n\u003e This option is recommended for scenarios where your application is running natively on a desktop or a mobile device, in other words, for scenarios where you cannot protect your app's credentials. This application type uses Proof Key for Code Exchange (PKCE) for increased security.\n\nThe blog also covers a basic snippet that you can use to generate a token with this flow.\nWith only a few modifications we can make a simple app hosted in [github pages](https://pages.github.com) so you can better understand how it works (and generate your own tokens for testing).\n\n## How it works?\n\nTo do that in a single page app without server side, we need no handle the steps below:\n\n![thumbnail](./assets/desktop-mobile-spa1.png)\n\nIf we use the [localStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) to store the client id and the code verifier, we can manage the 3LO token acquisition from our app.\n\n## Pre-requisite\n\nIf you wanna give it a try, you just need to add `https://autodesk-platform-services.github.io/aps-pkce-webapp` as a callback option in your APS app and click save, just like in the image below:\n\n![add callback url](./assets/pkce-app-callback.png)\n\nAnd with that you're able to obtain a valid token through this sample app.\n\nAlso, as long as you have this app [provisioned in your hub](https://tutorials.autodesk.io/#provision-access-in-other-products), this token can be used to view the contents you have access to.\n\n## Retrieving your token\n\nNow you just need to type your client id at https://autodesk-platform-services.github.io/aps-pkce-webap and start the process to get your token.\n\n![PKCE Token](./assets/pkce-token.gif)\n\n## License\n\nThis sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details.\n\n## Written by\n\nJoão Martins [@JooPaulodeOrne2](http://twitter.com/JooPaulodeOrne2), [Developer Advocate](http://aps.autodesk.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-platform-services%2Faps-pkce-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautodesk-platform-services%2Faps-pkce-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-platform-services%2Faps-pkce-webapp/lists"}