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

Initialize options for accounts from settings.json #13194

Open
wants to merge 8 commits into
base: release-3.0
Choose a base branch
from

Conversation

StorytellerCZ
Copy link
Collaborator

Noticed this earlier that Meteor.settings.packages.accounts-base is not properly initialized on server. I think we used to have this and it might have gotten lost, so I've looked through things and made fixes to ensure those settings get picked up properly.

Copy link

netlify bot commented Jun 13, 2024

Deploy Preview for v3-migration-docs canceled.

Name Link
🔨 Latest commit 2aaed14
🔍 Latest deploy log https://app.netlify.com/sites/v3-migration-docs/deploys/667a9059493d540008a9fa73

Copy link

netlify bot commented Jun 13, 2024

Deploy Preview for v3-meteor-api-docs canceled.

Name Link
🔨 Latest commit 2aaed14
🔍 Latest deploy log https://app.netlify.com/sites/v3-meteor-api-docs/deploys/667a905979ae120008df5f6f

@StorytellerCZ StorytellerCZ self-assigned this Jun 13, 2024
@@ -274,15 +282,15 @@ export class AccountsCommon {
}

// Validate config options keys
Object.keys(options).forEach(key => {
for (const key of Object.keys(options)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use for of instead of forEach?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better performance according to: https://romgrk.com/posts/optimizing-javascript

// TODO[FIBERS]: I need TLA
Accounts.init().then()
Accounts.init().then();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if TLA works here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will, but that is out of scope of this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run Meteor from checkout with await Accounts.init(); and didn't get any error. I can change the code here if you want.

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

Successfully merging this pull request may close these issues.

None yet

2 participants