0

I have a javascript folder which is basically a config file for the framework I'm using ( Luigi.js )

Now I need to import a provider into that config file but it does not let me, the next error appears :

Cannot use import statement outside a module

Here is the config file :

import OpenIdConnect from '@luigi-project/plugin-auth-oidc';
const myData = () => {
Luigi.setConfig({
auth: {
  use: 'openIdConnect',
  openIdConnect: {
    idpProvider: OpenIdConnect,
    authority: 'https://localhost:3000.com',
    client_id: 'client',
    scope: 'audience:server:client_id:client openID profile email groups',
    redirect_uri: '',
    automaticSilentRenew: true,
    accessTokenExpiringNotificationTime: 60,
  },
  disableAutoLogin: false,
}, ...
}

If anyone is interested to read the framework docs here is the link : https://docs.luigi-project.io/docs/authorization-configuration

Metgher Andrei
  • 197
  • 1
  • 10
  • Probably this will help you https://stackoverflow.com/questions/58211880/uncaught-syntaxerror-cannot-use-import-statement-outside-a-module-when-import – Arnau Nov 11 '22 at 12:21
  • @Arnau Thanks for the help. Although it did not fix my issue because even when I put my script as a module I then am needed to put an path only containing / which even after I put it correctly does not seem to work. Appreciate the effort – Metgher Andrei Nov 11 '22 at 13:24

0 Answers0