mirror of
https://github.com/outline/outline.git
synced 2026-11-22 14:01:41 +03:00
Add additional debug logging to InternalOAuthError case
This commit is contained in:
1 parent
4b8d58afbe
commit
01855d981f
1 file changed
+5
-1
@@ -1,5 +1,6 @@
|
||||
import passport from "@outlinewiki/koa-passport";
|
||||
import { Context } from "koa";
|
||||
import { InternalOAuthError } from "passport-oauth2";
|
||||
import env from "@server/env";
|
||||
import Logger from "@server/logging/Logger";
|
||||
import { AuthenticationResult } from "@server/types";
|
||||
@@ -15,7 +16,10 @@ export default function createMiddleware(providerName: string) {
|
||||
},
|
||||
async (err, user, result: AuthenticationResult) => {
|
||||
if (err) {
|
||||
Logger.error("Error during authentication", err);
|
||||
Logger.error(
|
||||
"Error during authentication",
|
||||
err instanceof InternalOAuthError ? err.oauthError : err
|
||||
);
|
||||
|
||||
if (err.id) {
|
||||
const notice = err.id.replace(/_/g, "-");
|
||||
|
||||
Reference in new issue
Block a user