I have problems when configuring Office 365 Azure AD Oauth with Flarum. The login process in O365 went well, but when the URL was returned, the returned URL was domain.com/auth/passport?code=XXX&state=XXX&session_state=XXX#, and the web page displayed "There was an error loading the page, please check the console."
In addition, Office 365 Azure AD requires a scope to be filled in. I have multiple scopes, and I don’t know what list format to fill in in the background.

More at FriendsOfFlarum/passport22