This example app shows how to build a PWA with Vue and TypeScript.
Please read Build Your First PWA with Vue and TypeScript to see how this app was created.
Prerequisites: Node.js.
Okta 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.
To install this example application, run the following commands:
git clone https://github.com/oktadeveloper/okta-vue-books-pwa-example.git
cd okta-vue-books-pwa-example
This will get a copy of the project installed locally. To install all of its dependencies, run:
npm install
If you don't have an Okta developer account, please create one. Then, create a new OIDC app on Okta:
- Log in to your developer account, navigate to Applications > Add Application.
- Select Single-Page App > Next.
- Give the application a name and set the redirect uri to: http://localhost:8080/callback.
- click Done.
Set the issuer
and copy the clientId
into src/router/index.ts
.
Vue.use(Auth, {
issuer: 'https://{yourOktaDomain}/oauth2/default',
client_id: '{clientId}',
redirect_uri: window.location.origin + '/callback',
});
Run the app with:
vue serve
And log in at http://localhost:8080
.
This example uses the following open source libraries from Okta:
Please post any questions as commnets on the blog post or ask them on the Okta Developer Forums. Our whole team monitors this channel and will see your questions. You can also enter them as issues on this project or ask them on Stack Overflow and add the okta
tag.
Apache 2.0, see LICENSE.