vanilla / addons

Official add-ons and tools for Vanilla Forums.
http://open.vanillaforums.com
108 stars 169 forks source link

Fix looping when JSConnect fails and site has Private Community turned on. #777

Closed nervoustwit closed 4 years ago

nervoustwit commented 4 years ago

Closes: #776

This PR will fix looping when trying to log in by passing a flag to the JSConnect JavaScript if it is a Private Community which will not redirect the browser if there is an error.

Also, this PR will add console logging if an Admin has put the JSConnect plugin in Test Mode.

To test

  1. Turn on JSConnect,
  2. configure it to be the Defualt method to log in.
  3. Put Forum into Private Community mode. Break your JSConnect authentication provider so that it does not return a UniqueID.
  4. Try to log in.
  5. Observe insane loop.
  6. Checkout this branch.
  7. Observe an error message when it fails.

Test console logging.

  1. Configure your JSConnect to be in Test Mode.
  2. Observe that when you log in, in the console log there is the Authentication response received.