{"id":18298695,"url":"https://github.com/fusionauth/fusionauth-example-device-grant","last_synced_at":"2025-04-05T13:33:59.654Z","repository":{"id":71200157,"uuid":"217135986","full_name":"FusionAuth/fusionauth-example-device-grant","owner":"FusionAuth","description":"Example HTML/JavaScript app demonstrating the Oauth2 Device Authorization Grant workflow","archived":false,"fork":false,"pushed_at":"2024-07-28T05:54:42.000Z","size":720,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-07-28T06:45:32.273Z","etag":null,"topics":["device-grant","example","fusionauth","hacktoberfest","oauth2-workflows","oidc"],"latest_commit_sha":null,"homepage":"https://fusionauth.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FusionAuth.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-23T19:21:35.000Z","updated_at":"2024-07-28T05:54:46.000Z","dependencies_parsed_at":"2024-02-23T19:44:42.385Z","dependency_job_id":"171df545-20a1-47a5-9875-521ec08779db","html_url":"https://github.com/FusionAuth/fusionauth-example-device-grant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-device-grant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-device-grant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-device-grant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-example-device-grant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FusionAuth","download_url":"https://codeload.github.com/FusionAuth/fusionauth-example-device-grant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223192687,"owners_count":17103564,"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":["device-grant","example","fusionauth","hacktoberfest","oauth2-workflows","oidc"],"created_at":"2024-11-05T15:06:45.090Z","updated_at":"2024-11-05T15:06:45.875Z","avatar_url":"https://github.com/FusionAuth.png","language":"JavaScript","readme":"FusionAuth Device Authorization Grant workflow example\n====\nA basic HTML/JavaScript app demonstrating the Device Authorization Request and Device Access Token Request of the [Oauth2 Device Authorization Grant](https://tools.ietf.org/html/rfc8628) specification.\n\nUse in conjunction with an installation of FusionAuth to demo the entire Device Grant workflow.\n\nUsage\n----\n\n1. [Download and install FusionAuth](https://fusionauth.io/download)\n1. [Create an Application](https://fusionauth.io/docs/v1/tech/tutorials/create-an-application)\n    1. Enable Device Grant on the OAuth tab under \"Enabled grants\"\n    1. Enter a Device Verification URL. \n      - This URL should be as short (and sweet) as possible.\n      - This URL will be either landing page to your application that can perform a `302` redirect to the FusionAuth device page with the required request parameters or a URL configured in a proxy to perform the same redirect.\n      - For example, `https://acme.com/activate` which would be able to redirect to `https://login.acme.com/oauth2/device?client_id={client_id}\u0026tenantId={tenantId}` where `https://login.acme.com` is the URL of your FusionAuth service.\n    1. Click save (blue icon at the top right).\n1. Update the [FusionAuth CORS policy](https://fusionauth.io/docs/v1/tech/reference/cors)\n    1. Add `http://localhost:8080` to \"Allowed origins\"\n    1. Check \"POST\" as an \"Allowed methods\"\n    1. Click save. \n1. Edit the `main.js` file in this project\n    1. Change `baseFusionAuthURL` to your base FusionAuth URL\n    1. Change `clientId` to that of the newly created Application in the previous step\n1. Run this example\n    1. Run `python3 -m http.server --bind 127.0.0.1` to start a simple HTTP server for the `index.html` file.\n    1. Open `http://localhost:8080` in your browser\n    1. Click the \"Click to Start\" button\n    1. Browse to the URL provided and enter the code or scan the QR code with your phone.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-example-device-grant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusionauth%2Ffusionauth-example-device-grant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-example-device-grant/lists"}