{"id":20307386,"url":"https://github.com/oktadev/okta-ionic-crypto-java-sdk-example","last_synced_at":"2025-04-11T15:11:46.448Z","repository":{"id":62889068,"uuid":"117200555","full_name":"oktadev/okta-ionic-crypto-java-sdk-example","owner":"oktadev","description":"Josh Morony's cryptoPWA with Okta Authentication + Holdings API that stores holdings in Okta","archived":false,"fork":false,"pushed_at":"2023-02-27T18:56:25.000Z","size":11610,"stargazers_count":7,"open_issues_count":7,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-25T11:21:24.689Z","etag":null,"topics":["authentication","cryptocurrency","ionic","java","jest","junit","okta","protractor","spring-boot","testing","travis-ci","typescript","wiremock"],"latest_commit_sha":null,"homepage":"https://developer.okta.com/blog/2018/05/02/testing-spring-boot-angular-components","language":"Java","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/oktadev.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":"2018-01-12T06:12:02.000Z","updated_at":"2022-09-08T04:03:19.000Z","dependencies_parsed_at":"2023-01-25T00:00:18.213Z","dependency_job_id":null,"html_url":"https://github.com/oktadev/okta-ionic-crypto-java-sdk-example","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/oktadev%2Fokta-ionic-crypto-java-sdk-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-ionic-crypto-java-sdk-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-ionic-crypto-java-sdk-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oktadev%2Fokta-ionic-crypto-java-sdk-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oktadev","download_url":"https://codeload.github.com/oktadev/okta-ionic-crypto-java-sdk-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429111,"owners_count":21101783,"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":["authentication","cryptocurrency","ionic","java","jest","junit","okta","protractor","spring-boot","testing","travis-ci","typescript","wiremock"],"created_at":"2024-11-14T17:17:32.058Z","updated_at":"2025-04-11T15:11:46.422Z","avatar_url":"https://github.com/oktadev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cryptocurrency PWA with Holdings Data in Okta\n \nThis example app shows how to use Okta's Java SDK to store cryptocurrency holdings as a custom user attribute.\n\nPlease read [Use Okta (Instead of Local Storage) to Store Your User's Data Securely](https://developer.okta.com/blog/2018/01/23/replace-local-storage-with-okta-profile-attributes) to see how this app was created. To see how it's tested, see [The Hitchhiker's Guide to Testing Spring Boot APIs and Angular Components with WireMock, Jest, Protractor, and Travis CI](https://developer.okta.com/blog/2018/05/02/testing-spring-boot-angular-components).\n\n**Prerequisites:** [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and [Node.js](https://nodejs.org/).\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 install this example application, run the following commands:\n\n```bash\ngit clone https://github.com/oktadeveloper/okta-ionic-crypto-java-sdk.git\ncd okta-ionic-crypto-java-sdk\n```\n\nThis will get a copy of the project installed locally. To install all of its dependencies and start each app, follow the instructions below.\n\nTo run the server, cd into the `holdings-api` folder and run:\n \n```bash\n./mvnw spring-boot:run\n```\n\nTo run the client, cd into the `crypto-pwa` folder and run:\n \n```bash\nnpm install -g ionic\nnpm i \u0026\u0026 ionic serve\n```\n\n### Setup Okta\n\nThe first thing you’ll need to do is add a `holdings` attribute to your organization’s user profiles. Log in to the Okta Developer Console, then navigate to **Users** \u003e **Profile Editor**. Click on **Profile** for the first profile in the table. You can identify it by its Okta logo. Click **Add Attribute** and use the following values:\n\n* Display name: `Holdings`\n* Variable name: `holdings`\n* Description: `Cryptocurrency Holdings`\n\nYou will need to [create an API Token and OIDC App](https://developer.okta.com/blog/2018/01/23/replace-local-storage-with-okta-profile-attributes#create-an-api-token) to get your values to perform authentication. \n\nLog in to your Okta Developer account (or [sign up](https://developer.okta.com/signup/) if you don’t have an account) and navigate to **Applications** \u003e **Add Application**. Click **Single-Page App**, click **Next**, and give the app a name you’ll remember. Click **Done**.\n\nFor the Okta Java SDK to talk to Okta’s API, you’ll need to create an API token. The abbreviated steps are as follows:\n\n1. Log in to your Developer Console\n2. Navigate to **API** \u003e **Tokens** and click **Create Token**\n3. Give your token a name, then copy its value\n\n#### Server Configuration\n\nOpen `holdings-api/src/main/resources/application.properties` and add your API token as a property. While you're there, set the `issuer` and `clientId` to match your OIDC application.\n\n**NOTE:** The value of `{yourOktaDomain}` should be something like `dev-123456.oktapreview.com`. Make sure you don't include `-admin` in the value!\n\n```properties\nokta.oauth2.issuer=https://{yourOktaDomain}.com/oauth2/default\nokta.oauth2.clientId={yourClientId}\nokta.client.token=XXX\n```\n\n#### Client Configuration\n\nFor the client, set the `issuer` and copy the `clientId` into `src/pages/login/login.ts`.\n\n```typescript\nconst config = {\n  issuer: 'https://{yourOktaDomain}.com/oauth2/default',\n  redirectUri: window.location.origin + '/implicit/callback',\n  clientId: '{clientId}'\n};\n```\n\n## Links\n\nThis example uses the following libraries provided by Okta:\n\n* [Okta Spring Boot Starter](https://github.com/okta/okta-spring-boot)\n* [Okta Auth SDK](https://github.com/okta/okta-auth-js)\n\n## Help\n\nPlease post any questions as comments on the [blog post](https://developer.okta.com/blog/2018/01/23/replace-local-storage-with-okta-profile-attributes), or visit our [Okta Developer Forums](https://devforum.okta.com/). You can also email developers@okta.com if would like to create a support ticket.\n\n## License\n\nApache 2.0, see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fokta-ionic-crypto-java-sdk-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foktadev%2Fokta-ionic-crypto-java-sdk-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foktadev%2Fokta-ionic-crypto-java-sdk-example/lists"}