question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Library does not work on nuxt application

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nooblingcommented, Aug 18, 2019

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

1reaction
jeverduzcocommented, Aug 7, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found