{"id":20307435,"url":"https://github.com/oktadev/okta-angular-graphql-example","last_synced_at":"2026-05-01T22:35:11.295Z","repository":{"id":46287270,"uuid":"418637332","full_name":"oktadev/okta-angular-graphql-example","owner":"oktadev","description":"A Quick Guide to Angular and GraphQL","archived":false,"fork":false,"pushed_at":"2021-11-02T02:44:14.000Z","size":596,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T13:59:36.438Z","etag":null,"topics":["angular","graphql"],"latest_commit_sha":null,"homepage":"https://developer.okta.com/blog/2021/10/22/angular-graphql","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"holgerschmitz/angular-graphql","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oktadev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-18T19:16:45.000Z","updated_at":"2021-11-02T02:44:17.000Z","dependencies_parsed_at":"2022-11-22T11:50:09.971Z","dependency_job_id":null,"html_url":"https://github.com/oktadev/okta-angular-graphql-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oktadev/okta-angular-graphql-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-angular-graphql-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-angular-graphql-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-angular-graphql-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-angular-graphql-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oktadev","download_url":"https://codeload.github.com/oktadev/okta-angular-graphql-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-angular-graphql-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32515838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["angular","graphql"],"created_at":"2024-11-14T17:17:42.627Z","updated_at":"2026-05-01T22:35:11.274Z","avatar_url":"https://github.com/oktadev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Consume a GraphQL API from Angular Example\n\nThis repository shows you how to consume a GraphQL API from Angular. Please read [A Quick Guide to Angular and GraphQL][blog] to see how it was created.\n\n**Prerequisites:**\n\n- [Node 14](https://nodejs.org/)\n- [Okta CLI](https://cli.okta.com)\n\n\u003e [Okta](https://developer.okta.com/) has Authentication and User Management APIs that reduce development time with instant-on, scalable user infrastructure. Okta's intuitive API and expert support make it easy for developers to authenticate, manage and secure users and roles in any application.\n\n* [Getting Started](#getting-started)\n* [Links](#links)\n* [Help](#help)\n* [License](#license)\n\n## Getting Started\n\nTo run this example, run the following commands:\n\n```bash\ngit clone https://github.com/oktadev/okta-angular-graphql-example.git\ncd okta-angular-graphql-example\n```\n\n### Create an OIDC Application in Okta\n\nCreate a free developer account with the following command using the [Okta CLI](https://cli.okta.com):\n\n```shell\nokta register\n```\n\nIf you already have a developer account, use `okta login` to integrate it with the Okta CLI. \n\nProvide the required information. Once you register, create a client application in Okta with the following command:\n\n```shell\nokta apps create\n```\n\nYou will be prompted to select the following options:\n- Type of Application: **2: SPA**\n- Redirect URI: `http://localhost:4200/login/callback`\n- Logout Redirect URI: `http://localhost:4200`\n\nThe application configuration will be printed to your screen:\n\n```shell\nOkta application configuration:\nIssuer:    https://dev-133320.okta.com/oauth2/default\nClient ID: 0oa5qedkihI7QcSoi357\n```\n\nReplace the values in `server/auth.js` with these values.\n\n```js\nconst oktaJwtVerifier = new OktaJwtVerifier({\n  clientId: '{yourClientID}',\n  issuer: 'https://{yourOktaDomain}/oauth2/default',\n});\n```\n\nUpdate `graphql-client/src/app/app.module.ts` with your Okta settings too.\n\n```ts\nconst config = {\n  clientId: '{yourClientID}',\n  issuer: 'https://{yourOktaDomain}/oauth2/default',\n  redirectUri: window.location.origin + '/login/callback'\n}\nconst oktaAuth = new OktaAuth(config);\n```\n\nIf you haven't done so already, install the dependencies.\n\n```shell\ncd server\nnpm install\n\ncd graphql-client\nnpm install\n```\n\nStart the GraphQL server in one terminal window with `node app.js`, and the Angular GraphQL client in another window.\n\n```shell\nng serve\n```\n\nOpen `http://localhost:4200` in your favorite browser and you should be able to log in and query for Star Wars characters.\n\n## Links\n\nThis example uses the following open source libraries from Okta:\n\n* [Okta Angular SDK](https://github.com/okta/okta-angular)\n* [Okta CLI](https://github.com/okta/okta-cli)\n\n## Help\n\nPlease post any questions as comments on the [blog post][blog], or visit our [Okta Developer Forums](https://devforum.okta.com/).\n\n## License\n\nApache 2.0, see [LICENSE](LICENSE).\n\n[blog]: https://developer.okta.com/blog/2021/10/22/angular-graphql\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fokta-angular-graphql-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foktadev%2Fokta-angular-graphql-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fokta-angular-graphql-example/lists"}