Skip to content

Commit

Permalink
Vue3 sample update (#6454)
Browse files Browse the repository at this point in the history
Updates MSAL Browser Vue 3 sample to use `initialize` as required by v3.
Addresses #6379
  • Loading branch information
jo-arroyo authored Sep 11, 2023
1 parent e64c1dc commit 8364605
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion samples/msal-browser-samples/vue3-sample-app/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MSAL.js 2.x + Vue 3 + TypeScript Sample
# MSAL.js + Vue 3 + TypeScript Sample

## About this sample

Expand Down
4 changes: 2 additions & 2 deletions samples/msal-browser-samples/vue3-sample-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build:package": "cd ../../../lib/msal-browser && npm run build:all"
},
"dependencies": {
"@azure/msal-browser": "^3.0.0-beta.0",
"@azure/msal-browser": "^3.1.0",
"element-plus": "^2.2.19",
"vue": "^3.2.41",
"vue-router": "^4.1.5"
Expand All @@ -19,4 +19,4 @@
"vite": "^3.1.8",
"vue-tsc": "^1.0.8"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ export function useMsal(): MsalContext {
}

if (inProgress.value === InteractionStatus.Startup) {
instance.value.handleRedirectPromise().catch(() => {
// Errors should be handled by listening to the LOGIN_FAILURE event
return;
instance.value.initialize().then(() => {
instance.value.handleRedirectPromise().catch(() => {
// Errors should be handled by listening to the LOGIN_FAILURE event
return;
});
});
}

Expand Down

0 comments on commit 8364605

Please sign in to comment.