{"id":18365221,"url":"https://github.com/festify/oauth-authorizator","last_synced_at":"2026-03-11T01:01:44.370Z","repository":{"id":57741253,"uuid":"94682337","full_name":"Festify/oauth-authorizator","owner":"Festify","description":"A Polymer 2.0 element that performs the OAuth authorization code flow.","archived":false,"fork":false,"pushed_at":"2017-10-31T12:43:55.000Z","size":24,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-24T03:58:19.547Z","etag":null,"topics":["oauth2-authorization","polymer","web-component"],"latest_commit_sha":null,"homepage":"","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/Festify.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}},"created_at":"2017-06-18T11:15:59.000Z","updated_at":"2023-02-27T12:05:53.000Z","dependencies_parsed_at":"2022-08-29T07:20:26.900Z","dependency_job_id":null,"html_url":"https://github.com/Festify/oauth-authorizator","commit_stats":null,"previous_names":["neolegends/oauth-authorizator"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Festify/oauth-authorizator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Foauth-authorizator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Foauth-authorizator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Foauth-authorizator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Foauth-authorizator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Festify","download_url":"https://codeload.github.com/Festify/oauth-authorizator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Festify%2Foauth-authorizator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267053016,"owners_count":24028032,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["oauth2-authorization","polymer","web-component"],"created_at":"2024-11-05T23:12:55.626Z","updated_at":"2025-12-12T04:50:01.952Z","avatar_url":"https://github.com/Festify.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \\\u003coauth-authorizator\\\u003e\n\nA Polymer 2.0 Element that performs the OAuth2 authorization code flow using a popup window.\n\n## Usage\n\n1. Properly polyfill [`URL`][1], [`URLSearchParams`][2] and [`fetch`][3], so that `fetch` can work with `URLSearchParams`-objects. `\u003coauth-receiver\u003e` only needs [`URLSearchParams`][2].\n2. Set up your OAuth2 config properly (Client ID, Redirect URL, etc.)\n3. Include the `oauth-authorizator` element on your page like this:\n```html\n\u003coauth-authorizator access-token=\"{{yourAccessToken}}\"\n                    authorization-url=\"The URL that will be loaded in the popup window, e.g. https://accounts.spotify.com/authorize\"\n                    client-id=\"Your Client ID\"\n                    redirect-url=\"The URL the popup window will be redirected to when authing has completed\"\n                    scopes=\"The scopes, either as array or space-separated string\"\n                    token-exchange-url=\"The URL to exchange the authorization code into an access and refresh token pair\"\n                    token-refresh-url=\"The URL where your token refresh server is located\"\u003e\n\u003c/oauth-authorizator\u003e\n```\n4. Set up the `oauth-receiver` on the redirect page\n```html\n\u003coauth-receiver target=\"Optional, the site you're hosting your website on. E.g. https://festify.us\"\u003e\u003c/oauth-receiver\u003e\n```\n5. Call `oauth-authorizator.login()` at the appropriate time to start the authorization process. The access token will appear as observable property at `oauth-authorizator.accessToken` or will be available through the Promise's return value.\n\n## Manual Mode\n\nIf you set the `manual`-attribute on `\u003coauth-receiver\u003e`, the element will not attempt to parse the parameters on page load. Instead, you will need to call `\u003coauth-receiver\u003e.receive()` in order to parse and send the OAuth get parameters. This could be useful if you want to show the user some content before redirecting back to the application.\n\n## License\nMIT\n\n[1]: https://developer.mozilla.org/en-US/docs/Web/API/URL\n[2]: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\n[3]: https://developer.mozilla.org/en-US/docs/Web/API/GlobalFetch/fetch","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffestify%2Foauth-authorizator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffestify%2Foauth-authorizator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffestify%2Foauth-authorizator/lists"}