“Error loading route” after Outlook authentication

:compass: Bug: “Error loading route” after Outlook authentication — Discourse Events Plugin

Hi Angus,

I’ve run into a UI bug after authenticating an Outlook calendar provider using a custom Azure app in the Discourse Events plugin.


:red_exclamation_mark:What happens

When I click “Authenticate” in the plugin UI, the Microsoft login and permissions popup completes successfully. However, when I’m returned to Discourse, I get the following message:

Error loading route
(This message is only shown to site administrators)

This happens immediately after the redirect from Microsoft.

The provider status remains stuck on “Ready, and event sync never completes.


:test_tube: Steps I’ve taken

  • Verified the Azure app config (client ID, secret, redirect URIs
  • Recreated the Outlook source from scratch with a valid calendar ID
  • Confirmed the Microsoft OAuth popup completes correctly and grants access
  • Rebuilt the forum and refreshed tokens in Sidekiq

:magnifying_glass_tilted_right: Diagnosis

My guess is this is a frontend route handling issue in the plugin after the /auth/authorize callback — possibly missing a return_to or mishandling the final transition.


:white_check_mark: What works

  • iCalendar sources
  • Google provider (although now showing 404 errors for another reason — might post separately)
  • Azure login popup and token request seem fine — the error happens after auth

:folded_hands: Help

Let me know if this is something that could be patched

Thanks again!