https://github.com/maximemoreillon/vue-oidc
https://github.com/maximemoreillon/vue-oidc
oauth oauth2 oidc vue
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/maximemoreillon/vue-oidc
- Owner: maximemoreillon
- Created: 2025-07-04T05:26:57.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-09-25T00:44:22.000Z (9 months ago)
- Last Synced: 2026-01-30T13:29:30.292Z (5 months ago)
- Topics: oauth, oauth2, oidc, vue
- Language: TypeScript
- Homepage:
- Size: 354 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vue OIDC
## Usage example
```ts
import { createApp } from "vue";
import { createPinia } from "pinia";
import { auth } from "@moreillon/vue-oidc";
import App from "./App.vue";
import router from "./router";
const app = createApp(App);
const { VITE_OIDC_AUTHORITY, VITE_OIDC_CLIENT_ID } = import.meta.env;
app.use(auth, {
authority: VITE_OIDC_AUTHORITY,
client_id: VITE_OIDC_CLIENT_ID,
});
app.use(createPinia());
app.use(router);
app.mount("#app");
```
Then in your components:
```vue
import { useAuth } from "@moreillon/vue-oidc";
const { user } = useAuth();
User
{{ user }}
```