Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Local Studio doesn't authenticate itself after signing into the dashboard #6710

Open
2 tasks done
wh1337 opened this issue Oct 17, 2024 · 5 comments
Open
2 tasks done
Labels

Comments

@wh1337
Copy link
Contributor

wh1337 commented Oct 17, 2024

📜 Description

  1. When you go to http://localhost:2022/studio/onboarding/preview and after signing in, you get 401 errors when trying to authenticate against the hosted Novu api.
  2. When trying to trigger a workflow from the studio onboarding, error messages appear stating that the Api Key cannot be found, even though NOVU_SECRET_KEY is in the env. Tried exporting this to my system env vars and it still failed.

Current implementation use express middleware in a nestjs project:

	app.use(express.json())
	app.use('/api/novu', serve({
		workflows: [AlertWorkflow],
		client: new Client({
			strictAuthentication: false
		})
	}))

👟 Reproduction steps

re description

👍 Expected behavior

Should be authenticated and should trigger test workflows.

👎 Actual Behavior with Screenshots

Image 1: Screenshot of the failed validation against the Novu API

2024-10-16 at 21 47 18@2x

Image 2: Failed attempt to trigger

2024-10-16 at 21 54 37@2x

Novu version

Novu SaaS

npm version

No response

node version

20 LTS

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

@wh1337
Copy link
Contributor Author

wh1337 commented Oct 17, 2024

Workaround: Manually go to http://localhost:2022/studio/flows if the onboarding fails you

@L-U-C-K-Y
Copy link
Contributor

Workaround: Manually go to http://localhost:2022/studio/flows if the onboarding fails you

After going to the URL manually, I still get 401 issues, do you have the same?

SCR-20241020-lvtt

@jainpawan21
Copy link
Member

jainpawan21 commented Oct 20, 2024

Add this environment variable NOVU_API_URL in bridge application, and change the value as per your configuration.

NOVU_API_URL=http://localhost:3000

@L-U-C-K-Y
Copy link
Contributor

Add this environment variable NOVU_API_URL in bridge application, and change the value as per your configuration.

NOVU_API_URL=http://localhost:3000

Thanks @jainpawan21 for the great help!

In terms of the syncing, I was able to solve it with this command:

npx novu@latest sync \
  --bridge-url <> \
  --api-url <> \
  --secret-key <>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants