Skip to content

Electron setup and callback issue #581

@b4dnewz

Description

@b4dnewz

I'm using electron and vue, I followed all the auth0 guides for both of them, but I'm facing some issues..

I state that I already used auth0 many times in past, also with vue (but never with electron) and never had this problem, so i'm stuck.

I'm using electron-vue which has this setup for dev and production mode:

const winURL = process.env.NODE_ENV === 'development'
  ? `http://localhost:9080`
  : `file://${__dirname}/index.html`

..some code

mainWindow.loadURL(winURL)

while in dev mode is using a webserver (webpack) on localhost 9080 so I entered as callback urls theese two: file:/// and http://localhost:9080 I get to the auth0 login screen then I type my details click Submit and when the redirect happen I get this error:

GET http://localhost:9080/callback 404 (Not Found)
VM100 hook.js:82 
Refused to execute inline script because it violates the following Content Security 
Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, 
a hash ('sha256-qbw0x/SNol1PfluopeQvYra2sc/ZExEm2+dikDVpEo8='), 
or a nonce ('nonce-...') is required to enable inline execution. 
Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.

At this point besides reading the message and googling a lot.. I've no clue what to do..any help?

Vue Router (that handle the front-end s.p.a. routing is on 'history' mode like in the tutorial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions