https://github.com/Amoki/nuxt-auth-scheme-bug
The reproduction repo is a brand new nuxt project with auth-next and an empty extend file in auth/oidc_scheme.js
npm run dev
Go to the localhost to trigger the error message
The custom Scheme is just
import Oauth2Scheme from '@nuxtjs/auth-next/dist/schemes/oauth2'
export default class OidcScheme extends Oauth2Scheme {}
and it's enough to trigger the bug.
Be able to extend a Scheme
An error message appears when loading any page of the app.

We discussed it on Discord yesterday but I think a trackable issue may be better.
I'm am bumping up against this too but the error I get is "Cannot use import statement outside a module "
bump
@Amoki @guided1 @kilakewe Hey guys! Just released docs about creation of custom scheme.
Note that this docs is for the latest release of auth-next. If you don't want to update because of possible breaking changes, then see the code below:
For versions before 5.0.0-1608136537.029f778:
import Oauth2Scheme from '~auth/schemes/oauth2'
Most helpful comment
bump