{"id":23139077,"url":"https://github.com/circuit/circuit-ionic-starter","last_synced_at":"2025-08-17T11:33:26.575Z","repository":{"id":26967309,"uuid":"112041841","full_name":"circuit/circuit-ionic-starter","owner":"circuit","description":"Ionic starter app using the Circuit SDK (OAuth 2.0 and video calling)","archived":false,"fork":false,"pushed_at":"2023-01-07T02:18:11.000Z","size":6694,"stargazers_count":5,"open_issues_count":28,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-05T06:23:48.489Z","etag":null,"topics":["circuit","collaboration","ionic","sdk","unify","webrtc"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/circuit.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":"2017-11-25T23:31:34.000Z","updated_at":"2022-04-24T08:14:51.000Z","dependencies_parsed_at":"2023-01-14T05:42:31.159Z","dependency_job_id":null,"html_url":"https://github.com/circuit/circuit-ionic-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/circuit/circuit-ionic-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fcircuit-ionic-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fcircuit-ionic-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fcircuit-ionic-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fcircuit-ionic-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/circuit","download_url":"https://codeload.github.com/circuit/circuit-ionic-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/circuit%2Fcircuit-ionic-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270840843,"owners_count":24655048,"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-08-17T02:00:09.016Z","response_time":129,"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":["circuit","collaboration","ionic","sdk","unify","webrtc"],"created_at":"2024-12-17T13:13:12.848Z","updated_at":"2025-08-17T11:33:26.173Z","avatar_url":"https://github.com/circuit.png","language":"TypeScript","readme":"# circuit-ionic-starter\n\nIonic 5 example application demonstrating how to use the Circuit SDK, specifically the challenging parts of authentication via OAuth 2.0 and WebRTC video calling.\n\nTested on Android and iOS.\n\u003cp float=\"left\"\u003e\n  \u003ckbd\u003e\u003cimg src=\"https://dl.dropboxusercontent.com/s/w1q88i4gdrx7238/ios1.png?dl=0\" width=\"200\"\u003e\u003c/kbd\u003e\n  \u003ckbd\u003e\u003cimg src=\"https://dl.dropboxusercontent.com/s/0odzzgc5zo7ja56/ios2.png?dl=0\" width=\"200\"\u003e\u003c/kbd\u003e\n\u003c/p\u003e\n\n\n\n\u003e App requires Circuit SDK version 1.2.7100 or higher which is available in circuit-sdk@beta. This version is compatible with the iosrtc plugin 5.0.2 or higher.\n\n\u003e iOS Authentication and iOS/Android video calling requires running on the device. The simulator will not work.\n\n## Authentication\nAuthentication is done OAuth 2.0 Implicit Grant. This means the user is redirected to a Circuit hosted OAuth login page for authentication. This application will then get a token to act on the user's behalf. This is the recommended authentication method for Ionic application, same as for regular client-side web applications. For more information on OAuth types in Circuit refer to [http://circuit.github.io/oauth]().\n\nTwo options exists for opening the Circuit OAuth page.\n1. Using the [cordova-plugin-inappbrowser](https://github.com/apache/cordova-plugin-inappbrowser) plugin to open a new browser instance for the OAuth url.\n2. Using Chrome Custom Tab (Android) and SFSafariViewController (iOS) with plugin [cordova-plugin-browsertab](https://github.com/google/cordova-plugin-browsertab).\n\nWe are using option 2 in this application which is the recommended option. Details can be found at [Stop using InAppBrowser for your Cordova/Phonegap oAuth flow](https://medium.com/@jlchereau/stop-using-inappbrowser-for-your-cordova-phonegap-oauth-flow-a806b61a2dc5) and [Modernizing OAuth interactions in Native Apps for Better Usability and Security](https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html).\n\nFor the redirection of the OAuth page back to the application we are using the plugin [Custom-URL-scheme](https://github.com/EddyVerbruggen/Custom-URL-scheme) with the uri scheme `com.unify.ionicstarter`.\n\n\n## WebRTC calling\n\nSee https://circuit.github.io/jssdk for Circuit JS SDK examples, including WebRTC direct and group calling.\n\n### Android\nAndroid uses Chrome webviews which natively supports WebRTC. No plugin is required.\n\nAndroid requires the permissions to be defined in the manifest, so if not already listed, add these permissions to /platforms/android/app/src/main/AndroidManifest.xml.\n\n```xml\n\u003cuses-permission android:name=\"android.permission.CAMERA\" /\u003e\n\u003cuses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\" /\u003e\n\u003cuses-permission android:name=\"android.permission.RECORD_AUDIO\" /\u003e\n\u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" /\u003e\n```\n\n### iOS\nFor iOS [cordova-plugin-iosrtc\n](https://github.com/cordova-rtc/cordova-plugin-iosrtc) is used which exposes the standard WebRTC APIs. To tell Circuit to use these APIs exposed by the plugin, call `Circuit.WebRTCAdapter.init()` after the plugin is loaded:\n\n```javascript\nthis.platform.ready().then(() =\u003e {\n    if (this.platform.is('ios')) {\n        Circuit.WebRTCAdapter.init();\n    }\n}\n```\n\n\u003e The cordova-plugin-iosrtc development is currently very active. This app uses version 5.0.5, but 6.0.0 is in beta already.\n\n\n## Useful links for Circuit SDK\n* [Circuit SDK on github](https://github.com/circuit/circuit-sdk)\n* [Circuit API documentation](https://circuitsandbox.net/sdk/) - See `client` class\n* [Circuit JS SDK examples](https://circuit.github.io/jssdk)\n\n\n## Usage\n\n### Prerequisites\n* Android Environment (or iOS if you’re working on a MacOS)\n* Cordova and Ionic installed. See https://ionicframework.com/docs/installation/cli  for details.\n\n### Get code\n```bash\n  git clone https://github.com/circuit/circuit-ionic-starter.git\n  cd circuit-ionic-starter\n  npm install\n```\n\n### Build and run on Android\n```bash\n  // Connect your device\n  ionic cordova run android\n```\n\n### Build and run on iOS\n```bash\n  // Connect your device\n  ionic cordova run ios\n  // or \"ionic cordova build ios\" and then use xcode to run the app on the device\n```\n\n### Run on desktop\nFor WebRTC to get the media stream the app needs to be hosted on https.\n```bash\n  ionic ssl generate  // Only the first time to create the self signed certificate\n  ionic serve --ssl -- --ssl-cert ./.ionic/ssl/cert.pem --ssl-key ./.ionic/ssl/key.pem --port 8443\n```\n\n### Debugging\nI use Visual Code with the \"Cordova Tools\" extension for debugging. But you can also use the Chrome Dev Tools for Android and Safari Web Inspector for iOS.\n\n## Known issues\n* None\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircuit%2Fcircuit-ionic-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcircuit%2Fcircuit-ionic-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcircuit%2Fcircuit-ionic-starter/lists"}