EnAccess / micropowermanager

Open Source Management Tool for Decentralized Utilities.
https://micropowermanager.io/
MIT License
2 stars 4 forks source link

Fix race condition in Company registration #354

Closed dmohns closed 4 days ago

dmohns commented 4 days ago

Brief summary of the change made

This PR resolves a race condition error at the end of company sign up. After a new user's company has been registered the frontend tries to fetch the enabled plugins. However, at this point the user isn't logged in yet, so the request fails.

Moving the call to after auth/authenticate fixes the issue. It remains a mystery how this ever worked.

Are there any other side effects of this change that we should be aware of?

N/A

Describe how you tested your changes?

docker compose up

Pull Request checklist

Please confirm you have completed any of the necessary steps below.