Library does not work on nuxt application
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Browser:
- Chrome version XX
- Firefox version XX
- IE version XX
- Edge version XX
- Safari version XX
Library version
Library version: 1.1.1
Current behavior
REPRO: https://codesandbox.io/s/codesandbox-nuxt-dhsud?fontsize=14
The nuxt app crashes when trying to instantiate msal with the following error.
The cache location provided is not valid. Provided value: sessionStorage. Possible values are: localStorage, sessionStorage.
Expected behavior
An error should not be thrown.
Minimal reproduction of the problem with instructions
Create a nuxt application and add the following code anywhere in the app e.g. created hook
var msalConfig = {
auth: {
clientId: 'your_client_id'
}
};
var msalInstance = new Msal.UserAgentApplication(msalConfig);
msalInstance.handleRedirectCallback((error, response) => {
// handle redirect response or error
});
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Cannot load a library on the client in a Nuxt app - Stack Overflow
Our imported library is not loading on the client. ... OO objects are undefined, so it fails the instanceOf checks and returns "didn't...
Read more >Installation - Nuxt
Here, you will find information on setting up and running a Nuxt project in 4 steps.
Read more >How to use arbitrary Vue libraries in your NuxtJS app - YouTube
Not all VueJS libraries work out of the box with Nuxt. Some of them have custom modules, others have Nuxt or SSR-specific instructions, ......
Read more >Creating Server-side Rendered Vue.js Apps Using Nuxt.js
The solution to this is clever: Have a version of the framework/library on the server that can build a ready-to-display page. Then send...
Read more >Vue.js | IntelliJ IDEA Documentation - JetBrains
The recommended way to create a new Vue.js app is the create-vue ... Don't Open: in this case IntelliJ IDEA doesn't open the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone using nuxt who wants a simple solution for auth Ive extended the nuxt auth library look at this example for how to use it. https://github.com/noobling/auth-module/tree/dev/examples/demo
Hi @noobling I have an example working in nuxt, it’s from the previous version but if I have time today I update the code to the current version. https://github.com/jeverduzco/nuxtjs-azure-ad-b2c-login