Skip to content

Commit 5b7c99d

Browse files
author
Matt Raible
authored
Update README with get started instructions
1 parent d028e41 commit 5b7c99d

File tree

1 file changed

+92
-3
lines changed

1 file changed

+92
-3
lines changed

README.md

Lines changed: 92 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,93 @@
1-
# okta-spring-boot-vue
1+
# Simple CRUD with Vue.js and Spring Boot
2+
3+
This example app shows how to build a basic CRUD app with Spring Boot 2.1, Spring Data, and Vue.js.
24

3-
The project conatins the project code for the Okta Spring Boot Vue tutorial. The code is divided into server and client projects.
4-
See the README's in each project for instructions on how to run the project.
5+
Please read [Build a Simple CRUD App with Spring Boot and Vue.js](https://developer.okta.com/blog/2018/11/20/build-crud-spring-and-vue) to see how this app was created.
6+
7+
**Prerequisites:** [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html), [Node.js](https://nodejs.org/), and [Yarn](https://yarnpkg.com/).
8+
9+
_For Java 10+, you'll need to change the `java.version` property and `jaxb-api` as a dependency. See Josh Long's [spring-boot-and-java-10](https://github.com/joshlong/spring-boot-and-java-10) project on GitHub for more information._
10+
11+
> [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.
12+
13+
* [Getting Started](#getting-started)
14+
* [Links](#links)
15+
* [Help](#help)
16+
* [License](#license)
17+
18+
## Getting Started
19+
20+
To install this example application, run the following commands:
21+
22+
```bash
23+
git clone https://github.com/oktadeveloper/okta-spring-boot-vue-crud-example.git
24+
cd okta-spring-boot-vue-crud-example
25+
```
26+
27+
This will get a copy of the project installed locally. To install all of its dependencies and start each app, follow the instructions below.
28+
29+
To run the server, cd into the `server` folder and run:
30+
31+
```bash
32+
./gradlew bootRun
33+
```
34+
35+
To run the client, cd into the `client` folder and run:
36+
37+
```bash
38+
yarn install && yarn run serve
39+
```
40+
41+
### Create a New OIDC App in Okta
42+
43+
To create a new OIDC app on Okta:
44+
45+
1. Log in to your developer account, navigate to **Applications**, and click on **Add Application**.
46+
3. Select **Single-Page App** and click **Next**.
47+
4. Give the application a name and click **Done**.
48+
49+
#### Server Configuration
50+
51+
Set your domain and copy the `clientId` into `server/src/main/resources/application.yml`.
52+
53+
**NOTE:** The value of `{yourOktaDomain}` should be something like `dev-123456.oktapreview`. Make sure you don't include `-admin` in the value!
54+
55+
```yaml
56+
okta:
57+
oauth2:
58+
client-id: {yourClientId}
59+
issuer: https://{yourOktaDomain}/oauth2/default
60+
```
61+
62+
#### Client Configuration
63+
64+
For the client, set the `issuer` and copy the `clientId` into `client/src/router.js`.
65+
66+
```js
67+
const config = {
68+
issuer: 'https://{yourOktaDomain}.com/oauth2/default',
69+
redirectUri: window.location.origin + '/implicit/callback',
70+
clientId: '{clientId}'
71+
};
72+
Vue.use(Auth, {
73+
issuer: 'https://{yourOktaDomain}/oauth2/default',
74+
client_id: '{yourClientId}',
75+
redirect_uri: window.location.origin + '/implicit/callback',
76+
scope: 'openid profile email'
77+
});
78+
```
79+
80+
## Links
81+
82+
This example uses the following open source libraries from Okta:
83+
84+
* [Okta Spring Boot Starter](https://github.com/okta/okta-spring-boot)
85+
* [Okta Angular SDK](https://github.com/okta/okta-oidc-js/tree/master/packages/okta-vue)
86+
87+
## Help
88+
89+
Please post any questions as comments on the [blog post](https://developer.okta.com/blog/2018/11/20/build-crud-spring-and-vue), 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.
90+
91+
## License
92+
93+
Apache 2.0, see [LICENSE](LICENSE).

0 commit comments

Comments
 (0)