Nuxt: $auth.loginWith() not working [Solved]

TypeError: Object(...) is not a function

image
DownloadNp
Last Updated: May 16th 2021

Issue:

On /login page
In console you will have the following warnings

./.nuxt/auth/schemes/oauth2.js 142:24-30

"export 'default' (imported as 'nanoid') was not found in 'nanoid'

./.nuxt/auth/schemes/oauth2.js 155:30-36

"export 'default' (imported as 'nanoid') was not found in 'nanoid'

 

Click on login with google
In console you will see the following errors:

TypeError: Object(...) is not a function

[Vue warn]: Failed to mount component: template or render function not defined.

What is expected ?
to go to the google login page

What is actually happening?
Nothing happens

SOLUTION:

Install nanoid 2.1.11 as a direct dependency in your project by running:

npm install --save nanoid@2.1.11

 

Please Login to Comment