Friday 31 May 2019

How do I authenticate a Vue.js progressive web app with the Microsoft Graph

I have a Vue.js app. This app is a progressive web app so it's intended to primarily run on the client-side. However, during the initial start-up, I need to authenticate the user in my Azure Active Directory, get data associated with their account, and store it for offline use.

I have a server-side API in place already for retrieving the data associated with a user account. I also know how to store it for offline use. However, my question is, how do I authenticate with the Microsoft Graph from my Vue.js app? Everything I see relies on using Node.js Middleware. But, unless I'm misunderstanding something, my progressive web app isn't a Node.js app, it's just straight up JavaScript, HTML, and CSS.

If the user closes the app, then revisits it in a couple of days, I believe I would need to use the refresh token to get a new access token. Still, once again, everything I see relies on Node.js middleware. I believe I need a solution that works purely in Vue.js / JavaScript. Am I mistaken?



from How do I authenticate a Vue.js progressive web app with the Microsoft Graph

No comments:

Post a Comment