{"id":21888680,"url":"https://github.com/swisscom/sample-uaa-angular-client","last_synced_at":"2025-04-15T10:20:54.968Z","repository":{"id":44117422,"uuid":"172519380","full_name":"swisscom/sample-uaa-angular-client","owner":"swisscom","description":"Oidc sample app for Angular","archived":false,"fork":false,"pushed_at":"2024-10-16T15:18:57.000Z","size":952,"stargazers_count":2,"open_issues_count":22,"forks_count":4,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-04T22:02:06.588Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/swisscom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-02-25T14:17:28.000Z","updated_at":"2024-10-16T15:19:00.000Z","dependencies_parsed_at":"2024-10-18T07:33:55.596Z","dependency_job_id":"a74cfdb0-fd9a-4ee7-bc47-3a921ad02a81","html_url":"https://github.com/swisscom/sample-uaa-angular-client","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/swisscom%2Fsample-uaa-angular-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fsample-uaa-angular-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fsample-uaa-angular-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisscom%2Fsample-uaa-angular-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swisscom","download_url":"https://codeload.github.com/swisscom/sample-uaa-angular-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249048817,"owners_count":21204317,"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":["hacktoberfest"],"created_at":"2024-11-28T11:16:37.184Z","updated_at":"2025-04-15T10:20:54.946Z","avatar_url":"https://github.com/swisscom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sample-uaa-angular-client\n\nThis is a small Angular sample app to demonstrate how to integrate with a UAA service using the implicit flow of OIDC. The code is based on the Angular sample app in [oidc-client-js](https://github.com/IdentityModel/oidc-client-js/tree/dev/samples/Angular/App).\n\n## Running this sample\n\nHere's how you can run the example app in your own space.\n\n### Set up a resource server\n\nTo run this sample, you need to first set up a resource server, i.e. an API to which your Angular app will connect once it has the auth token. To achieve this you can either deploy the [Spring Boot sample](https://github.com/swisscom/sample-uaa-spring-boot-service-provider) or the [Ruby sample](https://github.com/swisscom/sample-uaa-ruby-service-provider). We will refer to the URL under which this resource server is running as `\u003cresource server URL\u003e`.\n\n### Clone the repo\n\nNext you need to clone this repo.\n\n```\ngit clone https://github.com/swisscom/sample-uaa-angular-client.git\n```\n\n### Adapt the config\n\nAdapt the `manifest.yml` to include the route which you want to assign to your app as well as the URL of the resource server. Note that you will also need to reference this route in the service instance creation step below.\n\n```\n---\napplications:\n  - name: sample-uaa-angular-client\n    env:\n      SERVER_URL: \u003cresource server URL\u003e\n    memory: 64MB\n    command: $HOME/public/start.sh\n    path: dist\n    routes:\n      - route: \u003cprovide a route for your app\u003e\n    services:\n      - oauth2\n```\n\n### Create an instance of the UAA service\n\nUse the [Cloud Foundry CLI](https://github.com/cloudfoundry/cli) to create a user provided service instance for the UAA you are targeting. The parameter `redirectUris` will reference your app's route, as specified in the `manifest.yml`. Be sure to tag your service instance with `oauth2` as shown below, so that the the OIDC enpoints of the instace can be picked up by the service binding an served to the browser app.\n\n```\nCREDENTIALS='{\"logoutEndpoint\": \"\u003cuaa-url\u003e/logout.do\", \"userInfoEndpoint\": \"\u003cuaa-url\u003e/userinfo\", \"checkTokenEndpoint\": \"\u003cuaa-url\u003e/check_token\", \"scope\": \"openid,roles,user_attributes\", \"grantTypes\": \"implicit\", \"redirectUris\": \"\u003cyour app's route\u003e/callback\", \"authorizationEndpoint\": \"\u003cuaa-url\u003e/oauth/authorize\", \"clientId\": \"HwykJoWyMNmJMLe93OgFiTxeOzYVMk7ff80v7ss87FwUJKIwsyzlM6vm2YVN4u9g\", \"clientSecret\": \"null\", \"accessTokenValidity\": \"14400\", \"tokenEndpoint\": \"\u003cuaa-url\u003e/oauth/token\"}\ncf create-user-provided-service oauth2 -p $CREDENTIALS -t oauth2\n```\n\n### Build the Angular app\n\nRun the productive build for the Angular app.\n\n```\nnpm run build\n```\n\n### Push the app\n\nPush the app to Cloud Foundry\n\n```\ncf push\n```\n\n## Sample overview\n\n### Authorization code\n\n- Service provider (Spring boot): https://github.com/swisscom/sample-uaa-spring-boot-service-provider\n- Service provider (Ruby): https://github.com/swisscom/sample-uaa-ruby-service-provider\n\n### Implicit flow \u0026 Client Credentials\n\u003e **_WARNING:_** [PKCE's](https://oauth.net/2/pkce/) secure implementation renders the implicit flow obsolete, as it is [vulnerable](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics#section-2.1.2) and must not be used anymore.\n- Client (VueJS): https://github.com/swisscom/sample-uaa-vue-client\n- Client (React \u0026 Redux):https://github.com/swisscom/sample-uaa-react-redux-client\n- Client (AngularJS): https://github.com/swisscom/sample-uaa-angular-client\n\n- Resource Server (Spring boot): https://github.com/swisscom/sample-uaa-spring-boot-resource-server\n- Resource Server (Ruby): https://github.com/swisscom/sample-uaa-ruby-resource-server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisscom%2Fsample-uaa-angular-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswisscom%2Fsample-uaa-angular-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisscom%2Fsample-uaa-angular-client/lists"}