question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Signups forbidden when not signing up via /admin

See original GitHub issue

I’m using orion together with meteor-accounts-ui-bootstrap-3, and even though I’ve configured it so account creation is permitted via Options.set('forbidClientAccountCreation', false);, I can’t sign up using the accounts-ui-bootstrap functionality. I am getting a “Signups forbidden” message in the GUI, but no errors in client/server console. I can still sign up new users via the orion /admin page.

I can’t be sure if this is an orion issue or an issue with the accounts ui package, so I’ve also created an issue in the accounts-ui-bootstrap-3 repo, here.

I’ve set up a minimal example that reproduces the issue: https://github.com/Madsn/testingorion

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
sean-stanleycommented, Dec 17, 2015

Just in case anyone else finds this issue and removing accounts-ui did not resolve the issue. Make sure to call Options.set('forbidClientAccountCreation', false); in common code not client only code. I ran mine in client/admin/options.js and no result but moving the file to lib/options.js suddenly allowed me to create users locally again.

2reactions
swhamiltoncommented, Oct 27, 2015

@Madsn I have figured out a workaround that was not mentioned, but I am unsure if this new approach is a security hole. I will need others to help give insight here as I have limited Meteor experience.

Following the basic project here demonstrating the issue: https://github.com/Madsn/testingorion

I added the following lines in your testingorion.js file. Note BOTH client and server needed to be changed:

// Hack to force forbidClientAccountCreation option to false.
 if (Meteor.isServer) {
    Accounts._options.forbidClientAccountCreation = false;
 }

 if (Meteor.isClient) {
    Accounts.config({
        forbidClientAccountCreation: false
    });
 }

I don’t like setting the Accounts _option this way (without using a setter), but I couldn’t figure out a better way that worked. Perhaps this hack could lead to finding the real issue and solving it. It seems the issue is either the client, the server, or both are not properly setting the forbidClientAccountCreation to false, and I believe if one is false, it will not allow client account creation.

I also tried a bunch of different approaches to fixing this issue:

// None of these setters changed the forbidClientAccountCreation to be false:
 if (Meteor.isServer) {
    Options.set('forbidClientAccountCreation', false);

    Accounts.config({
        forbidClientAccountCreation: false
    });

    AccountsTemplates.options.forbidClientAccountCreation = false;

    orion.accounts.addProtectedRoute('home');
}

Any help from the community would be great to figure this one out and suggest something better than my probably bad solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Signups forbidden when using together with accounts-ui #96
I have set forbidClientAccountCreation: false in the config. ... Signups forbidden when not signing up via /admin orionjs/orioncms#288.
Read more >
What Is the 403 Forbidden Error and How to Fix It (8 Methods ...
It simply means that there is an issue with autorizing your request to access files or a particular page on your website.
Read more >
How to Fix a 403 Forbidden Error on Your WordPress Site
The 403 Forbidden error indicates that the server understood the request but refuses to authorize it. Find out more about the causes and ......
Read more >
3 Ways To Fix '403 Forbidden Request Forbidden By ...
This is another step that will most likely work in resolving the '403 forbidden request forbidden by administrative rules' immediately.
Read more >
How to resolve 403 Forbidden error when rendering sign-up ...
Is there a way to resolve 403 Forbidden error when rendering a sign-up view for admins? This issue does not happen to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found