Connecting toNuxt to a 3rd Party API

We are currently in the process of speccing a Nuxt application to replace an aging Vue application. The two requirements that we have set in stone at this point are: 1) Authenticate Users against MSAL, and 2) access our in-house API server (Hapi) using the MS Access Token What we are trying to figure out is how we store/manage the tokens once we have connected to Microsoft. We have managed to get the appropriate tokens from MSAL (usting nuxt-auth-utils) and atached them as Bearer tokens using an api plugin. We just need to figure out how and when to refresh the tokens We've seen Better-Auth recommended in a few places and reading the docs it's clear that it integrates with both Nuxt and Microsoft What is not clear from my fist look at the docs is a) whether the MSAL integration would return the Access Token (nuxt-auth-utils doesn't) b) whether the Access Token could be attached as a Bearer Token easily with Better-Auth c) whether Better-Auth makes the refresh of tokens on route change and api access simple. Any pointers would be welcome
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?